Changeset 1a8a806eb5b7b35bf10f0d5ddaa8cd4bf80c9995
- Timestamp:
- 29/09/10 19:45:20 (3 years ago)
- Children:
- 84149a808db352eb4dce1cd80b1e1f9ab0eab9d8
- Parents:
- 2c1e9b313f17c3adcca1e53bbf5c32cba4db58e1
- git-committer:
- Dererk <dererk@…> (29/09/10 19:45:20)
- File:
-
- 1 edited
-
arma2/frontend/user.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
arma2/frontend/user.py
r27576b3 r1a8a806 4 4 """ Nota: Aca no se crea el usuario, solo se reserva y se llama al proceso de flush de datos 5 5 """ 6 return True 6 7 7 8 def unbookUser(user): 8 9 """ Idem anterior, no borra usuario sino que lo quita de la cola de usuarios reservados 9 10 """ 11 return True 10 12 11 13 def checkBlacklistDB(user): … … 13 15 o por que algún subsistema detectó algun comportamiento extraño 14 16 """ 17 return False 15 18 16 19 def checkAvailability(user): 17 20 """ Funcion interna para pre-validar la disponibilidad de un usuario tras el POST 18 21 """ 22 l=ldap.open(ldapSERVER) 23 # Compatibility mode, JIC ® 24 # l.protocol_version = ldap.VERSION2 25 26 # This might through an exception 27 try: 28 l.simple_bind("","") 29 return user.lower() in [entry[1]['uid'][0].lower() for entry in l.search_s(ldapBASE,2,'uid=*')] 30 except ldap.SERVER_DOWN: 31 # I'll do something interesting with this in the future... 32 return None 33 except: 34 return None
Note: See TracChangeset
for help on using the changeset viewer.

