CUG login issue | Community
Skip to main content
Gaurav_Sachdeva_
Level 3
June 4, 2021
Solved

CUG login issue

  • June 4, 2021
  • 3 replies
  • 2994 views

Hi Team,

 

I have multiple CUG's enabled on my site. 

User of one CUG gets 404 error while accessing content of other CUG member .

we need to have login page of that CUG  instead of 404 error page.

If anyone has encountered similar scenario then your suggestions are welcome.

 

Thanks,

Gaurav

 

 

 

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 arunpatidar

Hi,

If the user is already logged in and able to access page1 where cug groups allowed user to view content and will not be able to access a page2 if user is not part of cug group.

If user is anonymous then only you can redirect user to login page as soon as user try to hit protected page. to achieve this you can create a sling filter which will check the protected page and user type and take actions.

To handle cache protected content you need to implemented permission sensitive caching .https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/permissions-cache.html?lang=en

3 replies

Pawan-Gupta
Level 8
June 4, 2021
Gaurav_Sachdeva_
Level 3
June 7, 2021

Thanks ,,this is different issue mine is different. In the issue you are refering has only one cug group and  redirection not working to login page. Here it's totally different scenario.

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
June 5, 2021

Hi,

If the user is already logged in and able to access page1 where cug groups allowed user to view content and will not be able to access a page2 if user is not part of cug group.

If user is anonymous then only you can redirect user to login page as soon as user try to hit protected page. to achieve this you can create a sling filter which will check the protected page and user type and take actions.

To handle cache protected content you need to implemented permission sensitive caching .https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/permissions-cache.html?lang=en

Arun Patidar
Gaurav_Sachdeva_
Level 3
June 7, 2021
Hi thanks for replying,, Actually If user is anonymous then it is already going to login page via ootb cug functionality. Issue is when user is not anonymous and part of any cug group and trying to access content which require login from another cug group member. There page 404 is coming, we need to have login page there.
ruchim71073425
Level 2
June 9, 2021

We had a similar issue with different users having access to different sections on the site, and if a logged-in user tried to access content of another group, they were seeing 404 page.

We implemented a service accessed by a component on our 404 page, that checked if it is a logged-in user and some other checks and responded with a specific message on the page.

This was the only way we could achieve our requirement.

I would be interested to know if there is another way possible.

 

Regards

Ruchi

June 9, 2021

Yes I will try to find any better way and let u know , otherwise this is the best way which you told, thanks