This content has been marked as final.
Show 2 replies
-
1. Re: Should Role.getGroups be added specifically to a certain user
mwohlf Dec 31, 2009 10:50 AM (in response to sumathra)Hi Kalpana,
from my experience the user who is assigned
Role A
in your scenario does inherit the other roles, there is a method in IdentityStore that is exactly for this propose:/** * Returns a list of all roles that the specified user is a member of. This list may contain * roles that may not have been explicitly granted to the user, which are indirectly implied * due to group memberships. */ List<String> getImpliedRoles(String name);
maybe you forgot to add them in your custom authentication method, you can do this for example:
IdentityManager identityManager = IdentityManager.instance(); for (String role : identityManager.getImpliedRoles(username)) { identity.addRole(role); }
-
2. Re: Should Role.getGroups be added specifically to a certain user
sumathra Dec 31, 2009 12:07 PM (in response to sumathra)Thanks that helps.