diff options
| author | Todd Willey <todd@ansolabs.com> | 2011-03-17 19:32:25 -0400 |
|---|---|---|
| committer | Todd Willey <todd@ansolabs.com> | 2011-03-17 19:32:25 -0400 |
| commit | 4940654f04c50c8593f8e5486fa9e4998f2a3fc7 (patch) | |
| tree | 4d6319b4a04c7fefc28016dd9992f5aace3d6b02 /nova/auth | |
| parent | d6e6ba0780faa962b35635dbd9f62818a98f5313 (diff) | |
Changing project manager should make sure that user is a project member.
Diffstat (limited to 'nova/auth')
| -rw-r--r-- | nova/auth/dbdriver.py | 2 | ||||
| -rw-r--r-- | nova/auth/ldapdriver.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/nova/auth/dbdriver.py b/nova/auth/dbdriver.py index d8dad8edd..d1e3f2ed5 100644 --- a/nova/auth/dbdriver.py +++ b/nova/auth/dbdriver.py @@ -162,6 +162,8 @@ class DbDriver(object): values['description'] = description db.project_update(context.get_admin_context(), project_id, values) + if not self.is_in_project(manager_uid, project_id): + self.add_to_project(manager_uid, project_id) def add_to_project(self, uid, project_id): """Add user to project""" diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index 5da7751a0..647f70db1 100644 --- a/nova/auth/ldapdriver.py +++ b/nova/auth/ldapdriver.py @@ -275,6 +275,8 @@ class LdapDriver(object): attr.append((self.ldap.MOD_REPLACE, 'description', description)) dn = self.__project_to_dn(project_id) self.conn.modify_s(dn, attr) + if not self.is_in_project(manager_uid, project_id): + self.add_to_project(manager_uid, project_id) @sanitize def add_to_project(self, uid, project_id): |
