Pas de deco du scheduler pour les admins reseau (responsablereseau)
This commit is contained in:
parent
29ae32e0be
commit
aa559459c8
@ -23,7 +23,7 @@ def admin_user():
|
||||
sched = Scheduler()
|
||||
|
||||
def disconnect_members_from_residence(admin_user, residence_dn):
|
||||
members = Member.get_all(admin_user, residence_dn)
|
||||
members = Member.get_all_non_admin(admin_user, residence_dn)
|
||||
print (CotisationComputes.current_year())
|
||||
|
||||
for member in members:
|
||||
|
@ -37,9 +37,13 @@ class Member(object):
|
||||
|
||||
@staticmethod
|
||||
def get_all(user_session, residence_dn):
|
||||
return user_session.ldap_bind.search(ldap_config.username_base_dn + residence_dn, "(objectClass=pacatnetMember)")
|
||||
return user_session.ldap_bind.search(ldap_config.username_base_dn + residence_dn, "(objectClass=pacatnetMember)")
|
||||
#end def
|
||||
|
||||
@staticmethod
|
||||
def get_all_non_admin(user_session, residence_dn):
|
||||
return user_session.ldap_bind.search(ldap_config.username_base_dn + residence_dn, "(&(objectClass=pacatnetMember)(!(memberof=cn=responsablereseau,ou=groupes,"+residence_dn+")))")
|
||||
|
||||
@staticmethod
|
||||
def get_all_with_machines_and_cotisations(user_session, residence_dn):
|
||||
return user_session.ldap_bind.get_childs(ldap_config.username_base_dn + residence_dn)
|
||||
|
Loading…
Reference in New Issue
Block a user