Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Martin Straus
Programmatic permissions on all users with org. role for specific orgs.
6 février 2013 13:35
Réponse

Martin Straus

Rang: New Member

Publications: 19

Date d'inscription: 6 juillet 2012

Publications Récentes

Hi, all! I'm fairly recent with Liferay and I'm struggling with something I need to do. I'd think it's simple, but I can't figure out how to do it. This is the scenario:
  • I have a number of organizations
  • I have three organization roles (user, administrator, owner)
  • Users will have one of those roles in the organization to which they belong.
For instance:
  • Org A
  • Org B
  • User 1 has role "owner" in "Org A".
  • User 2 has role "user" in "Org A".
  • User 3 has role "user" in "Org B".
Thus far, nothing strange. All this can be configured with the standard Liferay portlets.

I'm creating a portlet which will enable users to create a new kind of resource. Another portlet will let users query those resources. When creating an instance of this resource, the user must be able to indicate which roles of each organization will have access to the resource. For instance: all users with role "owner" in either "Org A" or "Org B" can access "Resurce 1".
Martin Straus
RE: Programmatic permissions on all users with org. role for specific orgs.
6 février 2013 13:34
Réponse

Martin Straus

Rang: New Member

Publications: 19

Date d'inscription: 6 juillet 2012

Publications Récentes

OK, I figured out how to do this. I created a new Resources for each organization, and then I created the ResourcesPermissions on each Resuorces for the organization roles. I can then use the PermissionChecker API to query whether a user has permissions on the resources.