Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Martin Straus
Programmatic permissions on all users with org. role for specific orgs.
6 de febrero de 2013 13:35
Respuesta

Martin Straus

Ranking: New Member

Mensajes: 19

Fecha de incorporación: 6 de julio de 2012

Mensajes recientes

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 de febrero de 2013 13:34
Respuesta

Martin Straus

Ranking: New Member

Mensajes: 19

Fecha de incorporación: 6 de julio de 2012

Mensajes recientes

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.