diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-07-30 15:36:11 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-07-30 15:36:11 -0700 |
| commit | 490a97783b97c5753692099c4d7f609e29a8f74e (patch) | |
| tree | 7f06a0db46758fc5af0f2fe8426b18c61b259cc3 | |
| parent | 1934cbb0413f074213b1aeeda605d9b49055c581 (diff) | |
use user.access instead of user.id
| -rw-r--r-- | nova/auth/manager.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/auth/manager.py b/nova/auth/manager.py index ca9f4fc86..bf3a3556d 100644 --- a/nova/auth/manager.py +++ b/nova/auth/manager.py @@ -421,7 +421,9 @@ class AuthManager(object): def get_access_key(self, user, project): """Get an access key that includes user and project""" - return "%s:%s" % (User.safe_id(user), Project.safe_id(project)) + if not isinstance(user, User): + user = self.get_user(user) + return "%s:%s" % (user.access, Project.safe_id(project)) def is_superuser(self, user): """Checks for superuser status, allowing user to bypass rbac |
