How to get Group name from Logged in User in ExtJs | Community
Skip to main content
Level 2
October 16, 2015
Solved

How to get Group name from Logged in User in ExtJs

  • October 16, 2015
  • 1 reply
  • 1075 views

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,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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