Hi,
I have a AEM user say X. I have two groups A and B. User X is member of Group B and Group B is member of Group A. How to identify Whether X is a member of A?
Thanks in advance
Regards,
Vasim
Solved! Go to Solution.
Views
Replies
Total Likes
Found the solution.
If I use requiredGroup.isMember(authorizableUser); It is working.
Thank you.
Views
Replies
Total Likes
You can use the JackRabbit UserManager API to get this type of information -- UserManager (Apache Jackrabbit 2.6.8 API)
Views
Replies
Total Likes
I tried following code. Still it is not working.
Authorizable authorizableUser = userManager.getAuthorizable("X");
Authorizable authorizableGroup = userManager.getAuthorizable("A");
if(authorizableGroup != null && authorizableGroup.isGroup()){
Group requiredGroup= (Group) authorizableGroup;
System.out.println(requiredGroup.isDeclaredMember(authorizableUser););
}
It is not even considering X as a member of Group A. In useradmin for user X it showing only Group B. It is not even considering X is a member of Group A.
Views
Replies
Total Likes
Found the solution.
If I use requiredGroup.isMember(authorizableUser); It is working.
Thank you.
Views
Replies
Total Likes