Hi all,
I have a tree of restricted pages like this:
Index (public)
-> Dashboard (restricted, not public)
-> Profile (restricted, not public)
-> Edit Profile (restricted, public)
-> Documents (restricted, public)
-> Public page
When I'm logged in I see the pages in the navigation menu, but if I click on one of the non public restricted pages (eg. Profile) I get a 404 error.
I think that the reason for that is because in the PagesController the
"redirect_to_public_child" method finds the page in this way:
@page.self_and_descendants.published.not_restricted.first
It skips all public restricted pages, but I think this is wrong, because if I'm logged in I can see the pages in the navigation.
I have the option "
redirect_to_public_child" set to true in the config, and I need this option also for the other pages.
I think that the solution could be to use the permissions (:show) instead of the restricted field directly?
In this way we can also set different access level for restricted pages, based on the user role (like we do :P)