patch pour difrencier les recherches sur les blacklist adhrents et les
blacklists machines darcs-hash:20060306194502-4ec08-2e53f10b214a0ee3bce04c91b9c7754cbd6e4375.gz
This commit is contained in:
parent
224ca1940e
commit
6dbaa724d5
1 changed files with 14 additions and 14 deletions
|
@ -240,8 +240,8 @@ class crans_ldap:
|
|||
'login': 'mail' ,
|
||||
'hostname': 'host',
|
||||
'mac': 'macAddress',
|
||||
'ip': 'ipHostNumber' ,
|
||||
'telephone': 'tel' }
|
||||
'ip': 'ipHostNumber',
|
||||
'telephone': 'tel'}
|
||||
|
||||
# Champs de recherche pour la recherche automatique
|
||||
auto_search_champs = { 'adherent': [ 'nom', 'prenom', 'tel', 'mail', 'chbre', 'mailAlias', 'cannonicalAlias' ], \
|
||||
|
@ -249,8 +249,8 @@ class crans_ldap:
|
|||
'club': [ 'nom', 'chbre' ] }
|
||||
|
||||
# Champs de recherche pour la recherche manuelle (en plus de la recherche auto)
|
||||
non_auto_search_champs = { 'adherent': [ 'etudes', 'paiement', 'carteEtudiant', 'aid' , 'postalAddress', 'historique' ,'blacklist', 'droits', 'uidNumber', 'uid', 'info', 'solde', 'controle', 'contourneGreylist', 'rewriteMailHeaders' ], \
|
||||
'machine': [ 'mid' , 'ipsec', 'historique', 'blacklist' , 'puissance', 'canal', 'portTCPin', 'portTCPout', 'portUDPin', 'portUDPout', 'prise' , 'info', 'exempt' ] ,
|
||||
non_auto_search_champs = { 'adherent': [ 'etudes', 'paiement', 'carteEtudiant', 'aid' , 'postalAddress', 'historique' ,'blacklist', 'droits', 'uidNumber', 'uid', 'info', 'solde', 'controle', 'contourneGreylist', 'rewriteMailHeaders', 'ablacklist'], \
|
||||
'machine': [ 'mid' , 'ipsec', 'historique', 'blacklist' , 'puissance', 'canal', 'portTCPin', 'portTCPout', 'portUDPin', 'portUDPout', 'prise' , 'info', 'exempt', 'mblacklist'] ,
|
||||
'club': [ 'cid' , 'responsable', 'paiement', 'historique', 'blacklist', 'mailAlias', 'info', 'controle' ] }
|
||||
|
||||
# Profondeur des différentes recherches (scope)
|
||||
|
@ -559,6 +559,8 @@ class crans_ldap:
|
|||
# Doit-on bloquer en cas de manque de la carte d'etudiant ?
|
||||
if config.bl_carte_et_definitif:
|
||||
el = "(&(|(carteEtudiant=%s)(objectClass=club))%s)" % (int(ann_scol), el)
|
||||
elif champ[1:] == 'blacklist':
|
||||
el = '(blacklist=%s)' % (expr)
|
||||
else:
|
||||
# Cas général
|
||||
el = '(%s=%s)' % (champ, expr)
|
||||
|
@ -669,16 +671,14 @@ class crans_ldap:
|
|||
|
||||
# Croisement
|
||||
bons_dn = [] # liste des dn d'adhérents qui correspondent aux critères
|
||||
if r['adherent']:
|
||||
for a in r['adherent']:
|
||||
if a[0] in mach_adh and not a[0] in bons_dn:
|
||||
bons_dn.append(a[0])
|
||||
result['adherent'].append(adherent(a,mode,self.conn) )
|
||||
if r['club']:
|
||||
for a in r['club']:
|
||||
if a[0] in mach_adh and not a[0] in bons_dn:
|
||||
bons_dn.append(a[0])
|
||||
result['club'].append(club(a,mode,self.conn) )
|
||||
for a in r['adherent']:
|
||||
if a[0] in mach_adh and not a[0] in bons_dn:
|
||||
bons_dn.append(a[0])
|
||||
result['adherent'].append(adherent(a,mode,self.conn) )
|
||||
for a in r['club']:
|
||||
if a[0] in mach_adh and not a[0] in bons_dn:
|
||||
bons_dn.append(a[0])
|
||||
result['club'].append(club(a,mode,self.conn) )
|
||||
|
||||
# Maintenant c'est au tour des bonnes machines
|
||||
bons_dn2 = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue