Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

CUG login issue

Avatar

Avatar
Level 1
Gaurav_Sachdeva1
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Gaurav_Sachdeva1
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Gaurav_Sachdeva1
Level 1

04-06-2021

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

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,358 likes

Total Posts

3,228 posts

Correct Reply

918 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

05-06-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-...

Gaurav_Sachdeva1
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.
Arun_Patidar
with ootb cug you can have one aem user session at a time, and ootb aem session take care of service protected pages or send user 404 if not intended user. What is your use case here, why you want to created multiple session for the user, instaed add user into the desire groups in the fly so that user can see the content.
gauravsachdeva3415

so the use case is :

user "A" is a member of CUG group "GroupA" and GroupA has read permission on /content/test/testsiteA/en.
It has login page configured with it at /content/test/testsiteA/login

similarly user "B" member of CUG group "GroupB" and GroupB has read permission on /content/test/testsiteB/en.

It has login page configured with it at /content/test/testsiteB/login

 

Now if user hits /content/test/testsiteA/en he lands on /content/test/testsiteA/login and able to login and render site /content/test/testsiteA/en
somewhere there is reference to page "/content/test/testsiteB/en/xyz"
when he hits this page 404 error comes ..

Here need is to get /content/test/testsiteB/login first and then render /content/test/testsiteB/en/xyz.

Also, we cannot keep common login page as it is multi tenant environment .
I tried to give read permission to login pages of other CUG groups ,
hence A can access /content/test/testsiteB/login and after login as different user can access /content/test/testsiteB/en/xyz

 

 

Thanks

Arun_Patidar

Hi,

AEM does create a login cookie on a domain or subdomain, if you are using a single domain then it is not possible to create multiple AEM sessions per portal. SO user A would have the session but restricted to access the content at /content/yoursite/B.

If you are using different domains for site A and B then it should work.

Gaurav_Sachdeva1
Yes that functionality is working fine previous user session is getting closes when we are logging with different uses, that is not a issue. Only we need to have login page instead of 404.

Answers (2)

Answers (2)

Avatar

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
rush_pawan
Level 7

04-06-2021

Avatar

Avatar
Validate 1
Level 1
ruchim71073425
Level 1

Likes

2 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile

Avatar
Validate 1
Level 1
ruchim71073425
Level 1

Likes

2 likes

Total Posts

13 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 1
View profile
ruchim71073425
Level 1

08-06-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