cosmin / stashy

Python API client for the Atlassian Stash REST API
Other
232 stars 147 forks source link

stash.admin.permissions.users.revoke returns True but does not do anything #75

Open dmgolovin opened 7 years ago

dmgolovin commented 7 years ago

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 5 years ago

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

In addition, a user may not demote their own permission level.