Recherche de club par uid
darcs-hash:20070530145826-c992d-cffd41d834ae1f2d0a2dfe2d57da3f0cf526a57e.gz
This commit is contained in:
parent
9f6407de26
commit
f9f5e869ee
1 changed files with 20 additions and 2 deletions
|
@ -79,7 +79,7 @@ blacklist_items = { u'bloq': u'Bloquage total de tous les services',
|
||||||
### Droits possibles
|
### Droits possibles
|
||||||
droits_possibles = [ u'Nounou', u'Apprenti', u'Modérateur', u'Câbleur',
|
droits_possibles = [ u'Nounou', u'Apprenti', u'Modérateur', u'Câbleur',
|
||||||
u'WebRadio', u'Imprimeur', u'MultiMachines',
|
u'WebRadio', u'Imprimeur', u'MultiMachines',
|
||||||
u'Bureau', u'Tresorier' , u'Compte Zamok']
|
u'Bureau', u'Tresorier']
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
### Droits critiques
|
### Droits critiques
|
||||||
|
@ -265,7 +265,7 @@ class CransLdap:
|
||||||
auto_search_champs = { \
|
auto_search_champs = { \
|
||||||
'adherent': \
|
'adherent': \
|
||||||
['nom', 'prenom', 'tel', 'mail', 'chbre', 'mailAlias', 'canonicalAlias'],
|
['nom', 'prenom', 'tel', 'mail', 'chbre', 'mailAlias', 'canonicalAlias'],
|
||||||
'club': ['nom', 'chbre'],
|
'club': ['nom', 'chbre', 'uid'],
|
||||||
'machineFixe': auto_search_machines_champs,
|
'machineFixe': auto_search_machines_champs,
|
||||||
'machineWifi': auto_search_machines_champs,
|
'machineWifi': auto_search_machines_champs,
|
||||||
'machineCrans': auto_search_machines_champs,
|
'machineCrans': auto_search_machines_champs,
|
||||||
|
@ -805,7 +805,25 @@ class CransLdap:
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def getProprio(self, uid, passwd=None, obligatoire=False):
|
||||||
|
"""
|
||||||
|
Renvoie un proprietaire ou un adherent correspondant au
|
||||||
|
login/ mot de passe (mot de passe facultatif)
|
||||||
|
obligatoire : mot de passe obligatoire
|
||||||
|
"""
|
||||||
|
recherche = self.search(("uid=%s" % uid))
|
||||||
|
proprio = None
|
||||||
|
|
||||||
|
if len(recherche['club']) > 0:
|
||||||
|
proprio = recherche['club'][0]
|
||||||
|
if len(recherche['adherent']) > 0:
|
||||||
|
proprio = recherche['adherent'][0]
|
||||||
|
|
||||||
|
if passwd:
|
||||||
|
if not proprio.verifyPasswd(passwd):
|
||||||
|
proprio = None
|
||||||
|
return proprio
|
||||||
|
|
||||||
__machines = ()
|
__machines = ()
|
||||||
def all_machines(self, graphic=False):
|
def all_machines(self, graphic=False):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue