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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
Adobe Summit 2023 | Complete list of AEM Sessions & Labs
SOLVED

Show pages (restricted) with lock icon.

Avatar

Level 3

Hello experts, I need your help with a use case.

I have a requirement where I have to show some links to the restricted pages (a Link with a lock icon)  to anonymous users.

-- When an user clicks on the page link it takes them to the login page.

-- For logged in users (aka Advisers) the lock icon should not appear and page should open seamlessly.

I had a similar requirement for documents on the website. Which I managed to handle by setting up deny ACL's on renditions/original for everyone and giving read access to advisors.

1378308_pastedImage_1.png

This ACL (shown above) lets me access the document's properties (document title) with anonymous access.

Please help me understand what should I do to get similar experience for Web Pages?

i.e. I want to show restricted web page links (page names) to anonymous users and once they click on it, want to redirect them to login.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

I think, that you only prevent read access to */jcr:content/renditions/original in /content/dam, but there are not ACLs on pages which prevent reading pages.

View solution in original post

0 Replies

Avatar

Level 7

From what it seems, your use case can be solved using CUG : Closed User Groups in AEM 6.3 Setting up a policy and applying it on the specific pages should take care of it..

Avatar

Employee

Hi,

I am assuming that links will get rendered via some component in the page. This component can fetch the link info via JS through some async call using selectors, example:

pagelinks.json - For annonymous

advisors.pagelinks.json - For advisors

The Rest service in AEM can generate JSON with links info as per the user type and access, sample:

{

  "id": "linkId",

  "title": "Link Title",

  "url": "http://url",

  "islocked": "false",

  "target": "_blank"

}

Now since links has info, whether its locked or not, upon clicking, user can be redirected to the login page through Java script.

Avatar

Correct answer by
Employee Advisor

Hi,

I think, that you only prevent read access to */jcr:content/renditions/original in /content/dam, but there are not ACLs on pages which prevent reading pages.