How to get permission of current user in servlet?
Hi friends,
In my AEM, I created some user groups (ex: my-group-1, my-group-2, my-group-3, my-group-4, etc). So, I create some users (ex: my-user-1, my-user-2, my-user-3) and add the user into some groups. Example:
my-user-1 in groups: my-group-1 , my-group-2, my-group-3
my-user-2 in groups: my-group-2 , my-group-3
Now, I want to create a Servlet to get all group of the current user that have a permission. Example, when I login to AEM with my-user-1. I will get a result with (my-group-1 , my-group-2, my-group-3). If I login to AEM with my-user-2, I will get a result with (my-group-2 , my-group-3).
How to do that?
Please, help me with a simple servlet.
Thank you so much,
BienHV