Expand my Community achievements bar.

SOLVED

LINKING TO THE REALM

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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