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

Remove the has_admin_rights property #40

Merged
merged 1 commit into from
Dec 24, 2015
Merged

Conversation

julienr
Copy link
Contributor

@julienr julienr commented Jun 19, 2015

This is a proposal to remove the has_admin_rights and replace it with a Client._call method that turns HTTP 401 (unauthorized) into PermissionError.

I think this is a better approach because otherwise has_admin_rights will end up having to exactly replicate the authorization logic of rabbitmq to handle all the corner cases. This seems hard and unnecessary. I think pyrabbit should just provide wrapper around the HTTP API without trying to be too smart.

This fixes problems with vhost-only users, like #39

with vhost. Instead, let rabbitmq handles the user authorization
and just wrap http 401 (unauthorized) into our own PermissionError
@bkjones bkjones merged commit 5fa5f7b into bkjones:master Dec 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants