Expand my Community achievements bar.

SOLVED

Page access with sling alias

Avatar

Level 3

Hi, I have a user who has read only access to all nodes under this path. /content/folder1/

I have a page like this. /content/folder1/folder2/mywebsite/pagegroupA/demo.html. folder1/folder2 are sling:OrderedFolder and pagegroupA, demo are both of type cq:Page. The user can access the page with  /content/mywebsite/pagegroupA/demo.html.

If I add a sling:alias property testAlias to demo node, the user cannot access the page with /content/mywebsite/pagegroupA/testAlias.html. Sling is not able to resolve this path and throws a 404. Another user with read access to the full tree starting from root can access with the sling alias name.

My question is if there is something related to permissions for sling:alias. We have to have restricted access to the conent for certain users. thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Correct answer by
Level 10

The only information set that can address this question is https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html.

Avatar

Level 3

Yes, my testing and observation is inline with the pseudo code in that documentation. So my understanding is that if Sling doesn't finds the exact path in the repo, it will start drilling down from root for a matching alias. And if the user doesn't have access to the root, it will fail at that first step and return 404.