Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Closed User Group Functionality in AEM 6.2

Avatar

Level 5

Hi Team,

We are working on Closed User Group Functionality in AEM 6.2.

After adding the Closed User Group for a page, it is still allowing other users which are not part of the group to access the page in author and publish environment.

We have used following helpx article for our reference https://helpx.adobe.com/experience-manager/6-2/sites/administering/using/cug.html

and Creating a Login Component for the Experience Manager Toy Store

It will be helpful if you can suggest the solution on the same.

with regards,

Richa Chaubey

4 Replies

Avatar

Administrator

Can you please help me with exact problem you are facing?

I have already checked both articles and it did worked for me.

Do you see some error in implementing?



Kautuk Sahni

Avatar

Level 5

Hi Kautuk,

I have created a user group named 'cug_access' and added the already existing user 'aaron.mcdonald@mailinator.com'. Then as per documentation, I installed the ToyStore-Login package. Then for the 'en' page I enabled closed user group functionality. In the admitted groups I added 'cug_access'. In permissions tab, I was unable to find the 'cug_access' group. Then I gave cug_access group read and read acl permissions only for the /content/summit-toys/en path. Due to which the group was added automatically in the page permissions tab. Without which I was not able add cug_access in the permission tab.

Later I published the page, user and user group. In the publish instance When I viewed the page permissions It showed 2 groups 'cug_access' and 'everyone'. In the publish instance, I deleted the 'everyone' group and I tried login with another user, but I was still able to login. Please find the publish instance 'en' page snapshot

1451215_pastedImage_5.png

with regards,

Richa Chaubey

Avatar

Level 5

Hi Kautuk,

Please let me know your views on the same.

with regards,

Richa Chaubey

Avatar

Administrator

Few quick check:

1. Did you check if you have checked the enable checkbox of Authentication Req and have also provided login link of the page there.

2. For Testing, Providing Full Rights to this group at /content/summit-toys level including the login page

3. Linking to the realm is important

// This means

When a page is under CUG control, then anonymous user cannot visit that page without login into application.

So when anonymous user accesses a page, that has link to secure page under CUG realm, then link-checker will disable the link since the access is not allowed for anonymous user to secure page.

So, create a place holder page and put a sling:redirect property on that page that points to secure page under CUG realm. Whenever a page is accessed that has sling:redirect prop, then it ends up doing a redirect to a page that the property points to.

Check this link out for more details on sling:redirect - https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.h tml

Now on page that earlier contained a link to secure page under CUG realm, now you can configure the same link to point to page that contains the sling:redirect property pointing to secure page. Doing so the links will be now enabled for anonymous user and clicking of which will ask user to login.

-Kautuk



Kautuk Sahni