Jump to content

How come "404 Not Found" is not visible with page-edit permission only


Recommended Posts

Posted

I noticed that a user with limited permissions (page-view and page-edit) cannot see the "404 Not Found" page in the tree. How is that? The template of that page is "basic-page", so no restrictions on template level. I am really interested, because I wouuld like to find a way to hide pages in that built-in manner. For example, I would like to hide my FormBuilder page.

Do you have any ideas how does it work?

Posted

The 404 page is declared as system page in the constructor here https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageList/ProcessPageListRenderJSON.php so there's probably no way currently to extend this exact behaviour besides editing the file itself. But you could hook Page::viewable and try to just disable the view access for that pages if the current process is ProcessPageList.

  • Like 2
Posted

@Ivan, Take a look at https://processwire.com/talk/topic/1176-hiding-uneditable-pages-from-users/?p=84916 to hide pages. (See settings Tab of the page)

Thanks, Martijn! I had a personal conversation with Adrian about this module. There are reasons that it is not in the module directory yet. They are discussed here:

I think core admin-view permission support on a page basic is something we can benefit from customizing admin interfaces for editors. That's why I was so interested to find out about the mechanism used for hiding 404 page revealed to me by LostKobrakai.

  • Like 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...