Jump to content

Page-delete permission granted, but it is not working for the user role?


Recommended Posts

For a website I created a new role - editor. This is a role for users that are only allowed to edit, view, create and delete pages. Very basic stuff!

Everything works, except the "move to trash" option is never shown in the page tree. I have granted the "page-delete" right to the user role but it has no effect. 

What am I missing?

Here's what the 'editor' role is configured.


Link to comment
Share on other sites

  • Stefanowitsch changed the title to Page-delete permission granted, but it is not working for the user role?
17 hours ago, poljpocket said:

Is this also true if you try to delete the page in question with "Edit# >> "Delete" tab?

It is still possible to delete a page that has children from the settings tab, yes. But here is no "trash" short-icon in the page tree for the same page.

Link to comment
Share on other sites

I can definitely reproduce this. The exact reason for it can be found here ProcessPageListActions.php @ line 221. The ability to trash a branch of pages as non-superuser is specifically not allowed. Why that is, probably only @ryan can shed some light into. This would also explain why "Edit" > "Delete" tab does not have the same restriction. The commit introducing this functionality from 2018 can be found here.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

@ryan I am very curious about the decision to limit deletions for non-admins to single pages. It would be great, if you elaborated a bit about the reasoning behind this. Thank you!

My sites mostly use the page tree for page section content aswell and in this situation, it is completely reasonable to assume a "normal editor" to be able to delete a page and it's children/sections/contents in one step. Maybe we could work on introducing configurability for this.

Thanks for considering!

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Came here because I use page table next and my staff users cannot delete a section they've added. They also can't delete any other pages, despite the permissions being allowed.

* p1 Home
  * p2 Some page (ptn field contains p5, p6...)
* p3 Admin
  * p4 Content elements
    * p5 a ptn section belonging to p2
    * p6 another ptn page belonging to p2

Someone with staff role has permission to delete pages, but the delete button next to p5, p6 on the edit screen for p2 does nothing - the response comes back silently with nothing happening (JSON returned includes `success: false, message:""`)

But this problem for me was solved by:


Link to comment
Share on other sites

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...