Stefanowitsch Posted July 27, 2023 Share Posted July 27, 2023 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 More sharing options...
wbmnfktr Posted July 27, 2023 Share Posted July 27, 2023 Does this help? https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#trash-for-all Found here: 4 1 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted July 28, 2023 Author Share Posted July 28, 2023 12 hours ago, wbmnfktr said: Does this help? https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#trash-for-all Found here: Absolutely. That makes it possible to delete Pages - as long as they have no children. 1 Link to comment Share on other sites More sharing options...
poljpocket Posted August 2, 2023 Share Posted August 2, 2023 On 7/28/2023 at 9:41 AM, Stefanowitsch said: as long as they have no children. Is this also true if you try to delete the page in question with "Edit# >> "Delete" tab? Link to comment Share on other sites More sharing options...
Stefanowitsch Posted August 3, 2023 Author Share Posted August 3, 2023 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 More sharing options...
poljpocket Posted August 3, 2023 Share Posted August 3, 2023 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. 1 Link to comment Share on other sites More sharing options...
poljpocket Posted August 28, 2023 Share Posted August 28, 2023 @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! 1 Link to comment Share on other sites More sharing options...
artfulrobot Posted November 14, 2023 Share Posted November 14, 2023 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now