Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dmgolovin opened this issue Jan 4, 2017 · 1 comment

Comments

@dmgolovin
Copy link

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
Copy link
Owner

cosmin commented Jan 25, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants