From dba410ceaf2ce5e01092d60f605cb3aa4db25cad Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sat, 14 Nov 2015 22:33:04 +0100 Subject: [PATCH] =?UTF-8?q?Retire=20du=20menu=20des=20cableurs=20les=20r?= =?UTF-8?q?=C3=A9f=C3=A9rences=20aux=20ports=20de=20machines,=20aux=20blac?= =?UTF-8?q?klistes=20et=20au=20certif=20(droits=20nounou=20et=20bureau)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/dialog/adherent.py | 2 +- gestion/dialog/machine.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) 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],