10/03/2021 at 14:12 #7412
Enabling ure_manage_options capability for a role removes/hides the “Posts/Pages/Custom Post Types Editor Restrictions” settings under user profile for anyone with that role.
I’m using the “WP Media Folder” plugin to manage file uploads in the Media Library, including making a virtual “folder” for each site user that gives them access to and shows them their uploaded files. For example, User A will have their own virtual folder in the Media Library where they can upload and view their files. WPMF also has a setting option to make a file uploaded by another user – for example, User B – visible to User A as well if User B’s file is placed in User A’s virtual folder. User’s cannot select which virtual folder they can upload files to, but as an administrator, I can make any file visible in any user’s virtual folder.
For a reason I do not know, this setting in the WPMF plugin allowing users to see other user files will only work if the ure_manage_options capability is enabled for the user’s role. However, enabling the ure_manage_options capability prevents the Editor Restrictions settings from being displayed in the user profile settings screen. Any previously configured restrictions are still maintained, however.
I don’t believe this is occurring as a result of a conflict with the WPMF plugin itself, but it was the process of configuring WPMF settings for users that made me aware of it happening.10/03/2021 at 14:56 #7413VladimirKeymaster
ure_manage_options – is the internal for User Role Editor user capability. If user can it, URE count it superadmin for URE itself. Thus URE does not restrict such user in any manner.
I doubt that WPMF checks ure_manage_options. It is more probable WordPress internal ‘manage_options’, which it may search as a substring occurrence in the user capabilities serialized value – just assumption. I can not say more without access to the WPMF source code. If you share it with support [at-sign] role-editor.com via Google Drive or similar, I may give you more details.10/03/2021 at 16:13 #7415
Thank you for the reply. Oddly enough, the file sharing of the WPMF plugin will not work with the manage_options capability enabled for the user role. It will only work if specifically the ure_manage_options capability is enabled.
I’ll send a link for the WPMF source as requested, and I appreciate you taking a look at it.11/03/2021 at 03:04 #7416VladimirKeymaster
Thanks. Quick check showed that WPMF does not use ‘ure_manage_options’ capability. Btw., for any permission check WPMF applies filter ‘wpmf_user_can’. So it’s possible to change, what permission it requires.
Re-thinking on the problem, I recalled that ‘edit restrictions’ set for a user automatically restricts the Media Library items available to this user – he sees only own items by default. More, if user can ‘ure_manage_options’, then ‘edit restrictions’ are not applied to him. So it would be a real reason of the described issue with access to the Media Library items inside WPMF, inspite of its internal access options.
Try to add this custom filter. It switches off the restrictions to the list of Media Library items available to a user with edit restrictions set.12/03/2021 at 12:43 #7417
The filter you provided resolved my issue perfectly, Vladimir. The “Editor Restrictions” settings are once again showing on the user profile screen and my users who have the specified role are able to see all the files uploaded by themselves or others in their own Media Library folder.
Thank you again and as always for the stellar support you provide!
- You must be logged in to reply to this topic.