Foren

Trying to understand how Permissions on files in the /documents work

Zak Thompson, geändert vor 7 Jahren.

Trying to understand how Permissions on files in the /documents work

Junior Member Beiträge: 70 Beitrittsdatum: 13.06.16 Neueste Beiträge
Hi everyone,

I've got a quick question regarding how permission checking works in the documents folder. Say I access a link like the one below:

"/documents/7655209/9579192/test.pdf/f6af68d1-ba1c-44e0-aef6-33719fec58fc"

When liferay does its permission check on who can view the resource, what part of the liferay code is doing it? And more specifically, does it need to query the DB for the permissions? Also say that 5 users were to access the resource, and it does query the DB for the permissions, will it query the DB for each user or will it cache the permissions after the first user accesses it?
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Trying to understand how Permissions on files in the /documents work

Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
Permission checking is handled at the service level.

Yes it would likely be a DB check. Yes it would be repeated for the 5 users. Each of the query results will be cached until it can be discarded.