Início » Liferay Portal » English » 6. Portal Framework

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
Bruce Altner
Determining permissions via roles with AND instead of OR
4 de Agosto de 2011 05:09

Bruce Altner

Ranking: New Member

Mensagens: 20

Data de entrada: 20 de Fevereiro de 2009

Mensagens recentes


I have a use case that would require me to set permissions to view artifacts based on combined roles. That is, if someone has Role A AND Role B and each role contained the view permission then they could see the artifact, but not if they had only one or the other role but not both. I may need to extend this to more than two roles as well. Does Liferay provide a means for doing this? As of right now the only solution I see is to make a combined role, called, say, Role A&B, but that starts to get unwieldy as the number of roles that you have to combine in this way increases as sum(i=0,N-1)2^i. That would mean 3 unique roles for A,B (A, B, and A&B ) but 7 unique roles for A,B,C (A, B,C, A&B, A&C, B&C, A&B&C) and so on. Not a good solution.

Thiago Leão Moreira
RE: Determining permissions via roles with AND instead of OR
1 de Agosto de 2011 15:04

Thiago Leão Moreira


Ranking: Liferay Legend

Mensagens: 1396

Data de entrada: 10 de Outubro de 2007

Mensagens recentes

Liferay does not support this by default. You must implement your customized PermissionChecker to allow Liferay to do this. Check the following properties for further information:

 2## Permissions
 5    #
 6    # Set the default permission checker class used by
 7    # com.liferay.portal.security.permission.PermissionCheckerFactory to check
 8    # permissions for actions on objects. This class can be overrided with a
 9    # custom class that implements
10    # com.liferay.portal.security.permission.PermissionChecker.
11    #
12    #permissions.checker=com.liferay.portal.security.permission.SimplePermissionChecker
13    permissions.checker=com.liferay.portal.security.permission.AdvancedPermissionChecker
Francesco R
RE: Determining permissions via roles with AND instead of OR
9 de Novembro de 2012 08:10

Francesco R

Ranking: New Member

Mensagens: 1

Data de entrada: 9 de Novembro de 2012

Mensagens recentes


I have the same requirement.
Now with Liferay 6 (CE or EE) is it possible?