#41356 closed defect (bug) (invalid)
permission typo in rest api
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.8 |
Component: | Users | Keywords: | |
Focuses: | rest-api | Cc: |
Description
I created a new role with delete_users capabilities.
While trying to delete an user via the rest api with this user, I get this error :
rest_user_cannot_delete
Looking in the code base I found that, the capabilities checked is delete_user instead of delete_users.
Change History (4)
Note: See
TracTickets for help on using
tickets.
delete_user
is a meta capability which maps todelete_users
via the context (the user ID in this case).Are you sure you're properly authenticated with a user which has permission to delete users? If you're using Multisite, you'll need to be authenticated with a Super Admin user.