Fórum

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

Zak Thompson, modificado 7 Anos atrás.

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

Junior Member Postagens: 70 Data de Entrada: 13/06/16 Postagens Recentes
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, modificado 7 Anos atrás.

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

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
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.