stash.admin.permissions.users.revoke returns True but does not do anything
dmgolovin opened this issue · 1 comments
dmgolovin commented
Hello,
I am trying to remove all permissions from the user , but for some reason there is no error and effect after running the command below:
import stashy
stash = stashy.connect("***", "***", "***")
users = stash.admin.permissions.users.revoke('dg_test')
print users # prints "True"
Thanks,
DG
cosmin commented
From what I can tell this is implemented correctly, making a DELETE
call to the correct resource and passing in the name of the user, and it sounds like the server is returning a successful error message. From the API docs it looks like possible issues may be a lack of permissions for the user you are calling the API with?
Quoting the API docs:
To call this resource the calling user must have
- ADMIN permission or higher; and
- greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)
In addition, a user may not demote their own permission level.