Dissocier l’étab de l’OU spécifique
This commit is contained in:
@ -73,7 +73,7 @@ index 0db4982..47f5c80 100755
|
|||||||
nscd_start()
|
nscd_start()
|
||||||
log.del_lock()
|
log.del_lock()
|
||||||
diff --git usr/lib/python3/dist-packages/scribe/enseignants.py usr/lib/python3/dist-packages/scribe/enseignants.py
|
diff --git usr/lib/python3/dist-packages/scribe/enseignants.py usr/lib/python3/dist-packages/scribe/enseignants.py
|
||||||
index 69f3411..97bf905 100644
|
index 69f3411..a5db6da 100644
|
||||||
--- usr/lib/python3/dist-packages/scribe/enseignants.py
|
--- usr/lib/python3/dist-packages/scribe/enseignants.py
|
||||||
+++ usr/lib/python3/dist-packages/scribe/enseignants.py
|
+++ usr/lib/python3/dist-packages/scribe/enseignants.py
|
||||||
@@ -145,45 +145,37 @@ class Enseignant(User):
|
@@ -145,45 +145,37 @@ class Enseignant(User):
|
||||||
@ -148,6 +148,21 @@ index 69f3411..97bf905 100644
|
|||||||
"""
|
"""
|
||||||
Mise à niveau d'un compte enseignant
|
Mise à niveau d'un compte enseignant
|
||||||
"""
|
"""
|
||||||
|
@@ -326,10 +318,14 @@ class Enseignant(User):
|
||||||
|
return res
|
||||||
|
|
||||||
|
def _is_enseignant(self, uid):
|
||||||
|
"""
|
||||||
|
test si l'utilisateur existe dans l'annuaire
|
||||||
|
"""
|
||||||
|
uidfilter = "(&%s(uid=%s))" % (PROF_FILTER, uid)
|
||||||
|
if self.ldap_admin._search_one(uidfilter):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ def get_etab(self, login, multi_etabs=False):
|
||||||
|
+ return '00000000'
|
||||||
diff --git usr/lib/python3/dist-packages/scribe/eoleldap.py usr/lib/python3/dist-packages/scribe/eoleldap.py
|
diff --git usr/lib/python3/dist-packages/scribe/eoleldap.py usr/lib/python3/dist-packages/scribe/eoleldap.py
|
||||||
index 45ec338..9a67c6d 100644
|
index 45ec338..9a67c6d 100644
|
||||||
--- usr/lib/python3/dist-packages/scribe/eoleldap.py
|
--- usr/lib/python3/dist-packages/scribe/eoleldap.py
|
||||||
@ -212,9 +227,32 @@ index 45ec338..9a67c6d 100644
|
|||||||
res = self.ldap_admin._search("(&%s%s)" % (USER_FILTER, filtre), attrs)
|
res = self.ldap_admin._search("(&%s%s)" % (USER_FILTER, filtre), attrs)
|
||||||
for user in res:
|
for user in res:
|
||||||
diff --git usr/lib/python3/dist-packages/scribe/eoleuser.py usr/lib/python3/dist-packages/scribe/eoleuser.py
|
diff --git usr/lib/python3/dist-packages/scribe/eoleuser.py usr/lib/python3/dist-packages/scribe/eoleuser.py
|
||||||
index 05569fd..c092698 100644
|
index 05569fd..b4e24e5 100644
|
||||||
--- usr/lib/python3/dist-packages/scribe/eoleuser.py
|
--- usr/lib/python3/dist-packages/scribe/eoleuser.py
|
||||||
+++ usr/lib/python3/dist-packages/scribe/eoleuser.py
|
+++ usr/lib/python3/dist-packages/scribe/eoleuser.py
|
||||||
|
@@ -329,21 +329,21 @@ class User(LdapEntry):
|
||||||
|
"""
|
||||||
|
return {}
|
||||||
|
|
||||||
|
def exec_smbldap_useradd(self, user_add_args, login):
|
||||||
|
"""
|
||||||
|
exécute smbldap-useradd
|
||||||
|
"""
|
||||||
|
cmd = ["/usr/sbin/smbldap-useradd"]
|
||||||
|
cmd.extend(self.user_add_params)
|
||||||
|
cmd.extend(user_add_args)
|
||||||
|
- etab = self.get_etab(login)
|
||||||
|
+ etab = self.get_etab(login, multi_etab=SUPPORT_ETAB)
|
||||||
|
force_dn = {'groupsdn="ou=local,ou=Groupes,${etab},${suffix}"': 'groupsdn="${suffix}"'}
|
||||||
|
tool.launch_smbldap_tool(cmd, num_etab, etab, force_dn=force_dn)
|
||||||
|
|
||||||
|
def _add_perso(self, login, **args):
|
||||||
|
"""
|
||||||
|
Crée les différents répertoires de l'utilisateur
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _add_scribe_user(self, login, **args):
|
||||||
@@ -410,20 +410,25 @@ class User(LdapEntry):
|
@@ -410,20 +410,25 @@ class User(LdapEntry):
|
||||||
grp = Group()
|
grp = Group()
|
||||||
grp.ldap_admin = self.ldap_admin
|
grp.ldap_admin = self.ldap_admin
|
||||||
|
Reference in New Issue
Block a user