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
Solved! Go to Solution.
Views
Replies
Total Likes
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-...
refer this to start with - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/cug-page-in-aem5-6-1-login...
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.
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-...
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
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.
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
Yes I will try to find any better way and let u know , otherwise this is the best way which you told, thanks
Views
Likes
Replies