Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

How to get Group name from Logged in User in ExtJs

Avatar

Level 2

Hi,

 

I am trying to get the Group Name from the Logged in user.

i used some thing like this for getting logged in user

 

CQ.User.getCurrentUser()

Link to CQ widgets API: https://dev.day.com/docs/en/cq/current/widgets-api/

 

But I dont see any method to fetch Group of that User.

If any one have solution regarding this please share.

 

Thanks,

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can use the http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/security/Group.html object. Then you can call its isMember(Authorizable authorizable) method to see if the user belongs to the given group. 

To learn how to work with the com.day.cq.security APIs from JavaScript -- see:

http://scottsdigitalcommunity.blogspot.ca/2013/07/using-ajax-requests-to-display-adobe-cq.html

Hope this helps

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

You can use the http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/security/Group.html object. Then you can call its isMember(Authorizable authorizable) method to see if the user belongs to the given group. 

To learn how to work with the com.day.cq.security APIs from JavaScript -- see:

http://scottsdigitalcommunity.blogspot.ca/2013/07/using-ajax-requests-to-display-adobe-cq.html

Hope this helps