Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › Allow Contributor Role to Manage User Accounts
- This topic has 11 replies, 2 voices, and was last updated 7 years, 8 months ago by Vladimir.
-
AuthorPosts
-
15/03/2017 at 02:26 #3447geistmikeParticipant
Hello, I apologize if this was address in another post. I searched and was unable to find it. I’m trying to grant permissions to the Contributor role to add/edit/delete new users. I have a URE Pro license. What are the minimum URE Pro settings to allow the Contributor Role to perform this function? Thanks so much in advance for the help and I’m so glad you’ve made this plug-in available!
15/03/2017 at 03:04 #3448VladimirKeymasterHi,
Thanks for the feedback.
In order to add/edit/delete users role should have at least these capabilities:
– list_users;
– edit_users;
– delete_users.15/03/2017 at 11:57 #3453geistmikeParticipantI have all six of the User boxes checked (create, delete, edit, list, promote, and remove) for the Contributor Role. That’s what’s confusing me. The Contributor can add a user, but can’t scroll the user list to view that user once it’s created. That’s why I wasn’t sure if I was missing something. Any ideas why the Contributor can’t scroll or search for users, but can add?
15/03/2017 at 13:40 #3454VladimirKeymasterlist_users capability allows access to the users list and search.
Just re-tested with single site WordPress – it works.15/03/2017 at 23:54 #3455geistmikeParticipantAny thoughts on what might prevent it from working? Are there any other settings that allow user creation, but don’t allow user search and scroll? I’m running a single WordPress site.
16/03/2017 at 00:19 #3456geistmikeParticipantI think I figured it out. I had the non-Pro version of Role Editor installed, but not active and the Pro version installed and active. I uninstalled the non-active, non-Pro version, and the behavior began working correctly.
16/03/2017 at 01:06 #3457geistmikeParticipantI take that back. It seemed to be fixed after I uninstalled the non-Pro version, but now the behavior returned. It’s the Activate Administrator Menu Access module. If I deselect the Activate Administrator Menu Access module under Tools->User Role Manager, I get the correct behavior, but if I activate it (check the box), I get incorrect behavior.
16/03/2017 at 01:20 #3458geistmikeParticipantI need to control what’s visible on the Admin Menu. Any thoughts on how to repair this issue?
16/03/2017 at 01:25 #3459VladimirKeymasterDo you have any blocked menu items with ‘Admin Menu’ for a ‘contributor’ role? Show screenshot.
17/03/2017 at 00:24 #3462geistmikeParticipantYes, I had blocked menu items. So here’s what I think happened.
1. I used the Admin Menu Module, but gave full 6/6 rights to the contributor role for users. It would allow the contributor to create new users, but not browse or search.
2. I assumed the error might be related to the disabled non-Pro version of the plug-in, so I uninstalled it. What I didn’t realize is that when I uninstalled it, it unchecked the Admin Menu option in the Pro version of the plug-in.
3. I then assumed uninstalling the non-Pro version fixed the problem because the Contributor role could create, browse, and search users, but what really happened is the uninstall turned off the Admin module.
4. I turned the Admin module back on and once again, I couldn’t browse or search users. All options in the Admin module were set to allow the Contributor to perform all actions except edit and delete pages, or access the Role Editor. Those were the only actions not permitted for the Contributor role. With that setting, the Contributor still could not browse or search users.
5. I had to turn the Admin module off; otherwise, my contributors couldn’t perform their work. I’m open to granting you access to the site if you want to look around for the issue. I was really hoping it was something you’ve seen before and had a quick fix.
6. One other note, when I uninstalled the non-Pro version, my license in the Pro version was removed. I didn’t realize it until the next day. I put the license back in and verified it.
Thoughts?
17/03/2017 at 01:44 #3463VladimirKeymasterPro version is built on the top of a free version and includes a copy of a free version as a core. Thus both free and Pro version use the same database record to same the settings you made. When you delete free version via WordPress options record was removed and Pro version had to start with default options.
Send administrator login credentials to the support [at-sign] role-editor.com
I will check your settings on-site.17/03/2017 at 02:32 #3465VladimirKeymasterI see and can repeat a problem at my test environment. Thanks for your help in discovering it. I will publish the update in a week.
When you use ‘Block not selected’ model at ‘Admin menu’, URE allows just exact URLs linked to the selected menu items: users.php for ‘All Users’ menu in your case. Pay attention – without any parameters. But when we search a user, an URL will be:
users.php?s=edit&action=-1&new_role&paged=1&action2=-1&new_role2
Pay attention on a list of additional parameters added to it.
URE counts such URL as prohibited, that’s why contributor user is redirected to the 1st available menu item every time he try use a search feature at the ‘Users’ page.I should add those parameters to the list of allowed parameters for the user.php URL, but I missed this.
Temporal workaround – switch to the ‘Block Selected’ model at ‘Admin menu’:
– select ‘Block selected’ at the top, then click on the top left checkbox with a ‘Shift’ key together – this will invert menu items selection. Save your updates.Recommendations: try to exclude unneeded menu items by revoking the related user capabilities 1st. Use ‘Admin menu’ to block menu items just for menus which you can not exclude via user capabilities, like in case with ‘edit_posts’. ‘Admin menu’ is the extension to the core permission system. But ‘user capabilities’ is primary defence level.
You can easily exclude some menus without ‘Admin menu’, just by revoking ‘manage_links’, ‘manage_eventon’ capabilities from ‘contributor’ role.
-
AuthorPosts
- You must be logged in to reply to this topic.