Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › User role can't search Media Library
Tagged: media, medialibrary
- This topic has 6 replies, 2 voices, and was last updated 6 years, 7 months ago by bostoninteractive.
-
AuthorPosts
-
11/04/2018 at 20:34 #4766bostoninteractiveParticipant
We’ve created a custom role that works as expected except for one thing.
When the user searches for an image in the Media Library, once they hit enter after entering the search term, they area thrown out of that page and directed to the dashboard.
What capability do I need to add to the role in order to allow searching the Media Library?
12/04/2018 at 04:11 #4771VladimirKeymasterI suppose the issue is related to the “Admin menu” restrictions made to this custom role. This part of the “Admin menu access” documentation page may help.
12/04/2018 at 13:47 #4775bostoninteractiveParticipantI don’t think that is the case. Please see the screenshot for the role that I am talking about.
https://drive.google.com/file/d/10qQXYGEO26-tbKIdpU4KdkSMJWY5ZLaV/view?usp=sharing
12/04/2018 at 15:17 #4776VladimirKeymasterThis screenshot just confirms my assumption. It is exactly the case addressed here. Try to follow to this recommendations:
1)You can change model from “block not selected” to “block selected” and invert menu items selection by pressing ‘Shift’ and click on the top checkbox.
or
2) You can add URL arguments added by search in the Media Library to the admin menu “URL Parameters White List” for this menu item.12/04/2018 at 19:21 #4777bostoninteractiveParticipantThe additional information is that it is the entire filter bar that is blocked, not just the search. A quick way for me to test is to select Audio for the All Media Items drop down.
If I go through the unchecked items in Block menu items: Not Selected and toggle them one by one, I never reach a point where the Media Library can be filtered.
If I check all, it is the same result.
If I select Block menu items: Selected and deselect all checkboxes, I can filter the Media Library.
If I check the items that were not checked under Block menu items: Not Selected, the filtering works as desired.
Could you explain, or point to documentation that does, what the difference is between these two modes in Admin Menu panel?
13/04/2018 at 02:16 #4778VladimirKeymasterI include links to the documentation from the very 1st answer. But it seems that you ignore them for some reason. Please open this thread on site in a browser and go to the documentation links provided. Then ask questions if you will still have them.
Searching/filtering adds new arguments/parameters to URL. When you use “Block not selected” model, only apparently selected menu links are allowed. The same link with additional argument(s) is counted as not selected, and thus, blocked. Take into account that “Block not selected” model is more restrictive comparing to the “Block Selected”, where URE block only links which you selected and does not decide itself what to block.
13/04/2018 at 14:52 #4779bostoninteractiveParticipantThanks. I will will read the doc again. I was getting confused, but I was able to solve the issue.
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.