diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-06-23 23:16:25 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2010-06-23 23:16:25 -0700 |
| commit | fb783d7fde342901db25733f917c666811fe30b2 (patch) | |
| tree | ac41866879d1be7708ac089d747ed7c83fe9f11f /nova | |
| parent | a90ca32ab9c75927efe6e92bd4add05ef57c2cb1 (diff) | |
Fix error message for checking for projectmanager role
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/auth/users.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/auth/users.py b/nova/auth/users.py index 6997596aa..1896abd9d 100644 --- a/nova/auth/users.py +++ b/nova/auth/users.py @@ -349,7 +349,9 @@ class UserManager(object): def has_role(self, user, role, project=None): with LDAPWrapper() as conn: - if project and role == 'projectmanager': + if role == 'projectmanager': + if not project: + raise exception.Error("Must specify project") return self.is_project_manager(user, project) global_role = conn.has_role(User.safe_id(user), |
