User group fails to purge deleted items from MODX Trash Bin

Hi all …

Members of the Administrators group can purge deleted items fine.

Members of a non-Administrators group can go through the motions of purging items fine, but ultimately, the files persist. No errors are received via MODX or in PHP error log.

The non-Administrators group uses an ACL with purge_deleted and remove permissions. I have confirmed that this ACL is in use.

The users can see the Trash icon, enter the Trash Bin page, select items , click Purge Selected Resources, confirm the “this cannot be undone” message. The page reloads and both panes refresh, but the files persist.

Via Chrome dev tools I can see the request to remove the files looks like this:

1. action:
resource/trash/purge

2. ids:
757,756

3. HTTP_MODAUTH:
modx5c9de5d2xxxxxx.73xxxxxx_135cb5e354xxxxxx.53xxxxxx [redacted]

And the page’s response looks like this:

{“success”:true,“message”:“Nothing was purged, no errors occurred.”,“total”:0,“data”:[],“object”:[]}

The only other difference I’ve noticed between the two user groups is that when an Administrator right clicks an individual deleted item, they get a context menu offering to purge or restore it. The non-Administrators group gets no context menu.

Have I missed a permission in the ACL?

Any thoughts V welcome!

MODX 2.7.1

I should add the ACL also has delete_document permission

Similar issue here. I am on ModCloud and created MODX 3 install.

However not even Administrators as SuperUsers can purge. Deleted resources are there to stay.

Roy

I have the same problem.
No context menu is shown with right click. Only SEDO-USER can delete items from the trash bin.

There is a permission purge_deleted that is required (at least to run the resource/trash/purge processor).

Unfortunately, this does not work even with the permission activated.

In the trash manager (manager/?a=resource/trash), when you open the developer tools in the browser (tab “Network”) and reload the data (button ↻ beneath the grid), what is the value of the resource field "cls" in the JSON response?

{
	"success":true,
	"total":2,
	"results":[{"id":1, ..., "cls":"trashpurge trashundelete trashsave trashedit trashrow"},...]
}

Does it contain trashpurge and trashundelete?


As far as I can tell, you need the permissions purge_deleted, save_document and edit_document to erase a resource. And undelete_document, save_document and edit_document to restore it.

Are the resources you want to erase in a resource group? Has the user the necessary permissions for this resource group?

I can’t find a resource field "cls".

But you can see the request? To connectors/index.php with the request parameter “action” = Resource/Trash/GetList?
And there is no “cls” property for every resource in the JSON response?

Unfortunately, I can’t see anything. Maybe I’m in the wrong view?

No the view is correct.
Clear the list (there is a trash-icon above the list) and then reload the data (button ↻ under the grid in the manager page). This should create a single new request in the list. Click on this request in the list. This opens a new area with tabs on the right side. Go to the tab “Response” and look at the JSON response data of this request.