diff --git a/gestion/dialog/adherent.py b/gestion/dialog/adherent.py index 6b1c02ca..91296a81 100644 --- a/gestion/dialog/adherent.py +++ b/gestion/dialog/adherent.py @@ -46,7 +46,7 @@ class Dialog(proprio.Dialog): 'GPGFingerprint' : [a.nounou, a.soi], 'Remarques' : [a.cableur, a.nounou], 'Droits':[a.nounou, a.bureau], - 'Blackliste':[a.cableur, a.nounou], + 'Blackliste':[a.bureau, a.nounou], 'Vente':[a.cableur, a.nounou], 'Supprimer':[a.nounou, a.bureau], } diff --git a/gestion/dialog/machine.py b/gestion/dialog/machine.py index 1e2f2393..fbd60d41 100644 --- a/gestion/dialog/machine.py +++ b/gestion/dialog/machine.py @@ -34,10 +34,11 @@ class Dialog(certificat.Dialog, blacklist.Dialog): """ a = attributs # Quel sont les attributs ldap dont on veut afficher et la taille du champs d'édition correspondant - to_display = [(a.host, 30), (a.macAddress, 17), (a.ipHostNumber, 15), - (a.portTCPout, 50), (a.portTCPin, 50), (a.portUDPout, 50), - (a.portUDPin, 50) - ] + to_display = [(a.host, 30), (a.macAddress, 17), (a.ipHostNumber, 15)] + + to_display_port = [(a.portTCPout, 50), (a.portTCPin, 50), (a.portUDPout, 50), + (a.portUDPin, 50)] + to_display_borne = [(a.canal, 10), (a.hotspot, 10), (a.puissance, 10), (a.positionBorne, 50), (a.nvram, 10)] # Quel séparateur on utilise pour les champs multivalué @@ -138,6 +139,9 @@ class Dialog(certificat.Dialog, blacklist.Dialog): if machine: objectClass = machine["objectClass"][0] + if self.has_right(a.nounou, proprio): + to_display += to_display_port + # Les bornes wifi ont un to_display différent if objectClass == 'borneWifi': to_display += to_display_borne @@ -192,8 +196,8 @@ class Dialog(certificat.Dialog, blacklist.Dialog): menu_droits = { 'Information' : [a.parent, a.cableur, a.nounou], 'Autre': [a.parent, a.cableur, a.nounou], - 'Blackliste':[a.cableur, a.nounou], - 'Certificat': [a.parent, a.cableur, a.nounou], + 'Blackliste':[a.nounou], + 'Certificat': [a.parent, a.nounou], 'Exemption' : [a.nounou], 'Alias' : [a.parent, a.cableur, a.nounou], 'Remarques' : [a.cableur, a.nounou],