diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2010-04-08 09:02:53 -0500 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-04-08 09:03:39 -0500 |
commit | ca8a53a3c98f0e124106cdd29792059272c191ee (patch) | |
tree | 26cef78de9061265215de7b0ba2bb8c6037e26f0 /src/lib/Server/Hostbase/ldapauth.py | |
parent | 8b9cb27cc5ccfaf0242b0cd4b0e08f18a90ab294 (diff) | |
download | bcfg2-ca8a53a3c98f0e124106cdd29792059272c191ee.tar.gz bcfg2-ca8a53a3c98f0e124106cdd29792059272c191ee.tar.bz2 bcfg2-ca8a53a3c98f0e124106cdd29792059272c191ee.zip |
Remove whitespace
Signed-off-by: Sol Jerome <solj@ices.utexas.edu>
Diffstat (limited to 'src/lib/Server/Hostbase/ldapauth.py')
-rw-r--r-- | src/lib/Server/Hostbase/ldapauth.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/Server/Hostbase/ldapauth.py b/src/lib/Server/Hostbase/ldapauth.py index 94f5192e0..f2148181f 100644 --- a/src/lib/Server/Hostbase/ldapauth.py +++ b/src/lib/Server/Hostbase/ldapauth.py @@ -57,7 +57,7 @@ class ldapauth(object): #svc_pass = passwd search_pth = os.environ['LDAP_SEARCH_PTH'] - + try: conn = ldap.initialize(os.environ['LDAP_URI']) conn.bind(svc_acct,svc_pass,ldap.AUTH_SIMPLE) @@ -69,7 +69,7 @@ class ldapauth(object): except ldap.LDAPError,e: #connection failed return ('error','LDAP connect failed',e,) - + def user_bind(self,distinguishedName,passwd): """Binds to LDAP Server""" search_pth = os.environ['LDAP_SEARCH_PTH'] @@ -127,11 +127,11 @@ class ldapauth(object): self.name_l = display_name[0] self.is_staff = False self.is_superuser = False - + return except KeyError, e: raise LDAPAUTHError("Portions of the LDAP User profile not present") - + def member_of(self): """See if this user is in our group that is allowed to login""" m = [g for g in self.memberOf if g == self.check_member_of] @@ -147,26 +147,26 @@ class ldapauth(object): user = os.environ['LDAP_GROUP_USER'] m = [g for g in self.memberOf if g == user] if len(m) == 1: - if level < 1: + if level < 1: level = 1 cspr = os.environ['LDAP_GROUP_SECURITY_LOW'] m = [g for g in self.memberOf if g == cspr] if len(m) == 1: - if level < 2: + if level < 2: level = 2 cspo = os.environ['LDAP_GROUP_SECURITY_HIGH'] m = [g for g in self.memberOf if g == cspo] if len(m) == 1: - if level < 3: + if level < 3: level = 3 admin = os.environ['LDAP_GROUP_ADMIN'] m = [g for g in self.memberOf if g == admin] if len(m) == 1: - if level < 4: + if level < 4: level = 4 return level - + |