Remove unused get_user_projects()
get_user_projects() becomes unused at commit
5b7d65b7a8
.
This patch removes the method for cleanup.
Change-Id: Ia0928bb8ab368216a2508079ff8061d3cd18c65f
This commit is contained in:
parent
3f587c5fd5
commit
f9f29e2062
@ -330,18 +330,6 @@ class ProjectApi(common_ldap.ProjectLdapStructureMixin,
|
||||
self.member_attribute = (conf.ldap.project_member_attribute
|
||||
or self.DEFAULT_MEMBER_ATTRIBUTE)
|
||||
|
||||
def get_user_projects(self, user_dn, associations):
|
||||
"""Returns the list of tenants to which a user has access."""
|
||||
project_ids = set()
|
||||
for assoc in associations:
|
||||
project_ids.add(self._dn_to_id(assoc.project_dn))
|
||||
projects = []
|
||||
for project_id in project_ids:
|
||||
# slower to get them one at a time, but a huge list could blow out
|
||||
# the connection. This is the safer way
|
||||
projects.append(self.get(project_id))
|
||||
return projects
|
||||
|
||||
def get_user_dns(self, tenant_id, rolegrants, role_dn=None):
|
||||
tenant = self._ldap_get(tenant_id)
|
||||
res = set()
|
||||
|
Loading…
Reference in New Issue
Block a user