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

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

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.
sunjot16
sunjot16Accepted solution
Employee
Feb 5, 2020 10:08 PM UTC

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

 

3 replies

Gaurav_Sachdeva_
Level 3
Jun 4, 2021 7:59 AM UTC
Hi Ruchi, did you able to solve this , I am having same issue and trying to solve it.
Translate
sunjot16
sunjot16Accepted solution
Employee
Feb 5, 2020 10:08 PM UTC

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

 

Translate
ruchim71073425
Level 2
Jun 9, 2021 6:30 AM UTC

Thanks. We used this solution.

Translate