LINKING TO THE REALM | Community
Skip to main content
manishc199176
December 25, 2016
Solved

LINKING TO THE REALM

  • December 25, 2016
  • 1 reply
  • 1225 views

Hi There,

In the AEM documentation on CUG the following is mentioned:

"Since the target of any links to the CUG Realm are not visible to the anonymous user, the linkchecker will remove such links.

To avoid this, it is advisable to create non-protected redirect pages that point to pages within the CUG Realm. The navigation entries are then rendered without causing the linkchecker any problems. Only when actually accessing the redirect page will the user be redirected inside the CUG Realm - after successfully providing their login credentials."

 

What does it exactly mean to "create a non-protected redirect page that points to pages within the CUG Relam"? Please let me know with an example.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Runal_Trivedi

When a page is under CUG control, then anonymous user cannot visit that page without login into application. 

So when anonymous user accesses a page, that has link to secure page under CUG realm, then link-checker will disable the link since the access is not allowed for anonymous user to secure page.

So article says that - create a place holder page and put a sling:redirect property on that page that points to secure page under CUG realm. Whenever a page is accessed that has sling:redirect prop, then it ends up doing a redirect to a page that the property points to.

Check this link out for more details on sling:redirect - https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html

Also geometrixx root node contains the same property, check that out too - localhost:4502/content/geometrixx/jcr:content

now on page that earlier contained a link to secure page under CUG realm, now you can configure the same link to point to page that contains the sling:redirect property pointing to secure page. Doing so the links will be now enabled for anonymous user and clicking of which will ask user to login.

Hope this helps :)

-- Runal

1 reply

Runal_Trivedi
Runal_TrivediAccepted solution
Level 6
December 29, 2016

When a page is under CUG control, then anonymous user cannot visit that page without login into application. 

So when anonymous user accesses a page, that has link to secure page under CUG realm, then link-checker will disable the link since the access is not allowed for anonymous user to secure page.

So article says that - create a place holder page and put a sling:redirect property on that page that points to secure page under CUG realm. Whenever a page is accessed that has sling:redirect prop, then it ends up doing a redirect to a page that the property points to.

Check this link out for more details on sling:redirect - https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html

Also geometrixx root node contains the same property, check that out too - localhost:4502/content/geometrixx/jcr:content

now on page that earlier contained a link to secure page under CUG realm, now you can configure the same link to point to page that contains the sling:redirect property pointing to secure page. Doing so the links will be now enabled for anonymous user and clicking of which will ask user to login.

Hope this helps :)

-- Runal