#52238 closed defect (bug) (fixed)
Missing option to change multiple users to "No role for this site"
Reported by: | bonniebeeman | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Users | Keywords: | good-first-bug has-patch needs-testing |
Focuses: | administration | Cc: |
Description (last modified by )
It is often critical for the security of a WordPress site to change User roles en masse, but the option to change a user role to "No role for this site" is missing from WordPress User option dropdown list.
Attachments (3)
Change History (13)
#1
@
4 years ago
- Component changed from General to Users
- Description modified (diff)
- Keywords reporter-feedback removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Hi @bonniebeeman and welcome to Trac!
"None" or "No role for this site" must be a plugin option, as it is not one of the standard WordPress roles.
If that plugin is User Role Editor, you could request that they add it as an option to the Change role dropdown:
User Role Editor support forum
Right now with that plugin, though, you could select all Subscriber-level users and select Subscriber in the Revoke role dropdown. That changes users' role to "None" if the revoke role matches their previous role.
#2
@
4 years ago
- Keywords needs-patch added
- Milestone set to Awaiting Review
- Resolution invalid deleted
- Status changed from closed to reopened
"No role for this site" is a core option, it's only available when editing a single user though. I don't see any reason for it not to be available as a bulk action on the Users screen.
#3
@
4 years ago
My mistake for not checking the Edit User screen. In addition to the bulk edit, would it be worth including this in the dropdown on the Add New User screen?
#4
@
4 years ago
- Keywords good-first-bug added
- Severity changed from critical to normal
- Version changed from 5.6 to 3.0
@
4 years ago
Added the "— No role for this site — " to the bulk user roles change; probably the best implementation would be to add the default role None to the wp_user_roles db option, but that would have it's own complexities
#6
@
4 years ago
- Keywords needs-testing added
- Milestone changed from Awaiting Review to Future Release
Thanks for the patch @ovidiul !
#7
@
4 years ago
- Milestone changed from Future Release to 5.7
52238.diff adjusts the patch slightly so the user's role gets correctly set to an empty string instead of none
.
Steps to test:
- Visit the Users screen in the admin area
- Check the checkbox next to a user
- Select "No role for this site" in the "Change role to" dropdown
- Click the "Change" button
- Confirm the user's role is marked as "None"
- Confirm the user shows up when you click the "No role" filter at the top of the Users screen
This isn't something we can add an automated test for (without E2E tests) as it's tightly coupled to the request.
#8
@
4 years ago
Tested the latest patch and can confirm the testing steps work as described by @johnbillion. None gets applied correctly in bulk.
Missing option to change user role to "no role for this user"