CUG: Doesn't show login page when accessing restricted content | Community
Skip to main content
ruchim71073425
Level 2
February 4, 2020
Solved

CUG: Doesn't show login page when accessing restricted content

  • February 4, 2020
  • 2 replies
  • 2128 views

Hi all,

 

We have a requirement of creating multiple CUG groups for different content hierarchies.

When configured, once a non-logged in user tries to access a restricted page from a particular hierarchy, we see the login page.

Now the user logs in with certain access as per the CUG group membership.

If this user now tries to access content for another CUG group, instead of being sent to login page (where we have messages like 'seems you do not have access....'), we see the 404 page.

 

Is there a way to resolve this?

 

Any help will be appreciated.

 

Regards

Ruchi

 

 

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 sunjot16

When a user is not logged in, AEM wants the user to login first, and then it will verify whether user is authorized to view that page or not.

When the user is already logged in and tries to access a restricted page, AEM redirects the user to the default Error Handler Page, as the user is not authorized to view that page.

 

It seems to be working as expected. It won't make any sense to redirect an already logged-in user to login page when he/she tries to access a restricted page.

 

What you can do is create a custom error handler page, and you can add a redirect in it to take the unauthorized user to some other page, if you would like to.

 

To create custom error handler, the following document may be helpful:

https://docs.adobe.com/content/help/en/experience-manager-65/developing/platform/customizing-errorhandler-pages.html

 

2 replies

sunjot16
Adobe Employee
sunjot16Adobe EmployeeAccepted solution
Adobe Employee
February 5, 2020

When a user is not logged in, AEM wants the user to login first, and then it will verify whether user is authorized to view that page or not.

When the user is already logged in and tries to access a restricted page, AEM redirects the user to the default Error Handler Page, as the user is not authorized to view that page.

 

It seems to be working as expected. It won't make any sense to redirect an already logged-in user to login page when he/she tries to access a restricted page.

 

What you can do is create a custom error handler page, and you can add a redirect in it to take the unauthorized user to some other page, if you would like to.

 

To create custom error handler, the following document may be helpful:

https://docs.adobe.com/content/help/en/experience-manager-65/developing/platform/customizing-errorhandler-pages.html

 

ruchim71073425
Level 2
June 9, 2021

Thanks. We used this solution.

Gaurav_Sachdeva_
Level 3
June 4, 2021
Hi Ruchi, did you able to solve this , I am having same issue and trying to solve it.