How to prevent a user from deleting and editing media files?
-
Hi,
I would like to configure that a contributor user can upload new media files, but this contributor user cannot edit the media files (including his/her own files), and this contributor user cannot delete media files (including his/her own files), but it does’t work.I installed both the PublishPress Capabilities Free and PublishPress Permissions Free plugins.
I use WordPress 5.8 and PHP 7.4, latest versions of the plugins and I don’t have any other plugins installed, only these two plugins.
Here is the screenshot of my capabilities page:
You don’t see on the screenshots, but the
edit own attachments
permission is also negated.And in the PublishPress Permissions plugin I have checked the “Enforce distinct edit, delete capability requirements for Media” option ,and I have unchecked the “Users can always edit their own attachments”.
I saved these settings and yes, there is a user assigned to the contributor role.
Then I login with that contributor user and no matter what I do, this contributor user will be able to delete the own media files (specifically images).
So everything works, except the fact that this contributor users is still able to delete his/her own media files.
But as you can see, I explicitly negated the permission to delete media files, so how is it possible?
- The topic ‘How to prevent a user from deleting and editing media files?’ is closed to new replies.