[lc_ldap/clubs] La mise en place des clubs dans l'intranet a été faite trop tôt.
* Aucun système de droit permettant au responsable de modifier club/machines de club n'avait été mis en place. C'est corrigé.
This commit is contained in:
parent
5559fa1876
commit
35f9c36461
4 changed files with 30 additions and 13 deletions
15
lc_ldap.py
15
lc_ldap.py
|
@ -538,7 +538,6 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
|
||||
if objdn.endswith(self.dn) and objdn != self.dn:
|
||||
return [attributs.parent]
|
||||
|
||||
else:
|
||||
return []
|
||||
|
||||
|
@ -554,7 +553,21 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
else:
|
||||
return []
|
||||
|
||||
def _check_respo(self, obj):
|
||||
"""
|
||||
Teste si l'objet fourni a pour responsable self.
|
||||
Retourne une liste qui s'ajoutera à la liste des droits
|
||||
"""
|
||||
|
||||
if "cid=" in obj.dn:
|
||||
club = obj
|
||||
if isinstance(obj, objets.machine) or isinstance(obj, objets.facture):
|
||||
club = obj.proprio()
|
||||
if isinstance(club, objets.club) and "aid=" + str(club['responsable'][0]) + "," + variables.base_dn == self.dn:
|
||||
return [attributs.respo]
|
||||
return []
|
||||
|
||||
return []
|
||||
|
||||
def get_local_machines(self, mode='ro'):
|
||||
filter=""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue