I am trying to get page restrictions where either
- The page has direct permissions
- The page inherits permissions from its parent
- The page inherits permissions from its space
I can still get direct page/space restrictions, but I am unable to find the users/groups that a page inherits from its parent. Here is my page structure:
Use Case 1
- Page 1 (Page ID - 1001) - Restricted to User1, User2
- Page 1.1(Page ID - 1002) - Restricted to User2
- Page 1.1.1(Page ID - 1003) - Unrestricted
Use Case 2
- Page 2 (Page ID - 2001) - Restricted to User1, User2
- Page 2.2(Page ID - 2002) - Unrestricted
- Page 2.2.2(Page ID - 2003) - Unrestricted
I want to get the users/groups via SQL query who have access to a specific page when I pass them the ID to that page. My requirement is
- For use case 1, when I provide 1003, it should return me users/groups that have access to 1002.
- For use case 2, when I provide 2003, it should return users/groups that have access to 2001.