Foren
Determining permissions via roles with AND instead of OR
Bruce Altner, geändert vor 12 Jahren.
Determining permissions via roles with AND instead of OR
New Member Beiträge: 20 Beitrittsdatum: 20.02.09 Neueste Beiträge
Greetings:
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.
Thanks,
Bruce
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.
Thanks,
Bruce
Thiago Leão Moreira, geändert vor 12 Jahren.
RE: Determining permissions via roles with AND instead of OR
Liferay Legend Beiträge: 1449 Beitrittsdatum: 10.10.07 Neueste Beiträge
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:
##
## Permissions
##
#
# Set the default permission checker class used by
# com.liferay.portal.security.permission.PermissionCheckerFactory to check
# permissions for actions on objects. This class can be overrided with a
# custom class that implements
# com.liferay.portal.security.permission.PermissionChecker.
#
#permissions.checker=com.liferay.portal.security.permission.SimplePermissionChecker
permissions.checker=com.liferay.portal.security.permission.AdvancedPermissionChecker
F R, geändert vor 11 Jahren.
RE: Determining permissions via roles with AND instead of OR
New Member Beitrag: 1 Beitrittsdatum: 09.11.12 Neueste Beiträge
Hi,
I have the same requirement.
Now with Liferay 6 (CE or EE) is it possible?
Tnx
I have the same requirement.
Now with Liferay 6 (CE or EE) is it possible?
Tnx