Removing redundant check
This commit is contained in:
@@ -135,11 +135,6 @@ class LdapDriver(object):
|
|||||||
if self.__ldap_user_exists(name):
|
if self.__ldap_user_exists(name):
|
||||||
# Retrieve user by name
|
# Retrieve user by name
|
||||||
user = self.__get_ldap_user(name)
|
user = self.__get_ldap_user(name)
|
||||||
if user.has_key('accessKey') and user.has_key('secretKey') \
|
|
||||||
and user.has_key('isAdmin'):
|
|
||||||
raise exception.Duplicate("LDAP user %s already exists" \
|
|
||||||
% name)
|
|
||||||
else:
|
|
||||||
# Entry could be malformed, test for missing attrs.
|
# Entry could be malformed, test for missing attrs.
|
||||||
# Malformed entries are useless, replace attributes found.
|
# Malformed entries are useless, replace attributes found.
|
||||||
attr = []
|
attr = []
|
||||||
|
|||||||
Reference in New Issue
Block a user