Change WordPress user roles and capabilities › Forums › Give user access to plugin – how to › Access to Redirection Plugin
Tagged: plugin access, Redirection
- This topic has 8 replies, 3 voices, and was last updated 4 years, 10 months ago by Vladimir.
-
AuthorPosts
-
20/03/2018 at 17:29 #4695cmcfieldParticipant
Hi-
I have an plugin called Redirection.
How can I give a user rights to use this plugin?
I can see the plugin when I am logged in as Administrator. But even if I make a copy of the Administrator role called CMF Core Team and not change any capabilities, when I log in as CMF Core Team it does not show up under the tools menu.
I saw in another post you told someone, “If this plugin is available at wordpress.org send its download link. If it’s a paid product I need its copy for checking what permissions it uses. You can share it with support [at-sign] role-editor.com via DropBox or similar service”. So here is the website to download the plugin. It is a free plugin. https://redirection.me/
Thanks,
Candice21/03/2018 at 01:48 #4696VladimirKeymasterHi,
This plugin menu item “Tools->Redirection” is protected by ‘manage_options’ capability. I added ‘manage_options’ capability to the custom role and get access to the this menu item.
Try to deactivate all other plugins. May be some plugins hides this menu item for your role.
21/03/2018 at 16:40 #4700cmcfieldParticipantHi-
For the role CMF Core Team I do have ‘manage_options’ checked and Redirection still does not show in the menu.
Under the Administrator Role ‘manage_options’ is also checked and it does display. Are you sure it is the ‘manage_options’ checkbox because it works under the Administrator Role.
Also, I cannot and it does not make sense for me to deactivate all other plugins. That would be very counter-productive to keeping my WordPress working correctly. Secondly, Redirection shows under Administrator so a plugin is not what is blocking it from displaying.
Please advise me on what to try next or how to resolve this issue.
Thanks.
22/03/2018 at 01:05 #4701VladimirKeymasterHi,
>>Are you sure it is the ‘manage_options’ checkbox?
Yes, I’m sure. I test it before send the answer to you. Look at the screenshots.
Look at readme.txt of Redirection plugin, line 135:
“Permissions changed from ‘administrator’ role to ‘manage_options’ capability”.
Look at the redirection-admin.php, line #342:$hook = add_management_page( 'Redirection', 'Redirection', apply_filters( 'redirection_role', 'manage_options' ), basename( REDIRECTION_FILE ), array( &$this, 'admin_screen' ) );
>> Redirection shows under Administrator so a plugin is not what is blocking it from displaying.
Some plugin, User Role Editor for example does not block ‘administrator’ by design, but block any other role according to the settings made.Temporal deactivating of all plugins to check if not some plugin causes a problem is the 1st measure when something goes wrong with WordPress. You can unintentionally block this menu for a role, with URE “Admin menu” access add-on for example. That’s why I offer to deactivate all plugins.
If it’s not applicable to your site, make its full backup (with Updraft Plus plugin or similar) and restore as a stage/test copy, proceed your tests with it.
23/03/2018 at 00:17 #4702cmcfieldParticipantHi-
I wrote a response to your last post but it doesn’t look like it went through. How do I change permissions from ‘administrator’ to ‘manage_options’? In the Admin Menu for my Administrator role the user capabilities column lists Redirection as ‘Administrator’ and not ‘manage_options’. Would changing this solve my problem?
A couple items to note:
1) I read line 135 in the readme.text and saw the changelog. As stated above my Administrator Admin Panel still list the user capability as administrator and not manage options. How do I change this to ‘manage_options’?2) In the Redirection-admin.php, I don’t have that line of code at line #342 and didn’t see it.
3) I have latest version of Redirection is installed.
Thanks.
23/03/2018 at 01:25 #4703VladimirKeymasterHi,
Thanks for the clarification. We looked at the different versions. Download link at https://wordpress.org/plugins/redirection/
leads to the version 3.2, but “Download Plugin” button at the https://redirection.me/ leads to the version 3.2.1 (development version).
v. 3.2. uses for admin menu item “Tools->Redirection” the ‘administrator’ role, but v. 3.2.1 (which I tested) uses ‘manage_options’ already.
You can update to version 3.2.1 or use this filter to change ‘administrator’ to ‘manage_options’ or your own custom capability:add_filter('redirection_role', 'replace_redirection_cap', 10, 1); function replace_redirection_cap($cap) { $cap = 'manage_options'; return $cap; }
I recommend the 2nd variant, as version 3.2.1 still use ‘administrator’ in some places, for the REST API calls, for example.
23/03/2018 at 02:01 #4704cmcfieldParticipantHi-
Thanks for the quick response. I looked and I have version 3.2 installed.
I did your second option and added the code to the very end of the redirection-admin.php file and it WORKED!
Thanks so much for all your support!
Candice16/02/2020 at 21:41 #6631petereloyParticipantHi Vladimir!
It’s already two years ago that you solved this problem… now their is something. If I use the mange_options the rol will have access to all plugins, I really just want the rolle to have access to the redirect plugin. Already installed this plugin but I am coming from “quick redirect”. I am flexible to use whatever plugin. Can you help?
Thanks,
17/02/2020 at 14:45 #6632VladimirKeymasterIf you have other plugins which use ‘manage_options’ you may block admin menu items created by those plugins using Admin menu blocking add-on.
-
AuthorPosts
- You must be logged in to reply to this topic.