Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 2

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

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee

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-errorha...

 

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

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-errorha...

 

Avatar

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