Created
December 31, 2015 03:37
-
-
Save charz/8d45e47e8c525939f485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/swift/common/middleware/keystoneauth.py b/swift/common/middleware/keystoneauth.py | |
index 6a0b91b..200c05b 100644 | |
--- a/swift/common/middleware/keystoneauth.py | |
+++ b/swift/common/middleware/keystoneauth.py | |
@@ -424,9 +424,9 @@ class KeystoneAuth(object): | |
# If we are not reseller admin and user is trying to delete its own | |
# account then deny it. | |
- if not container and not obj and req.method == 'DELETE': | |
+ if not container and not obj and req.method in ['PUT', 'DELETE']: | |
# User is not allowed to issue a DELETE on its own account | |
- msg = 'User %s:%s is not allowed to delete its own account' | |
+ msg = 'User %s:%s is not allowed to put or delete its own account' | |
self.logger.debug(msg, tenant_name, user_name) | |
return self.denied_response(req) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment