Tâche #35343
Scénario #35363: Ninegate avec AD : la configuration du profile ne devrait pas être obligatoire
Ninegate avec AD : la configuration du profile ne devrait pas être obligatoire
Début:
18/04/2023
Echéance:
% réalisé:
100%
Restant à faire (heures):
0.0
Description
Ninegate permet de créer des utilisateurs en mode AD. Dans un établissement, je n'ai pas besoin de configurer les profiles en mode itinérant.
La configuration ne devrait pas être obligatoire pour pouvoir créer des comptes avec profile locaux.
Voici les modifs que j'ai faite pour cela :
diff --git a/dicos/91_ninegate.xml b/dicos/91_ninegate.xml index fa3b5c08..76d16f87 100644 --- a/dicos/91_ninegate.xml +++ b/dicos/91_ninegate.xml @@ -102,7 +102,7 @@ <variable type='string' name='ninegate_ldaptype' description="Annuaire Cadoles LDAP ou AD " mandatory='True'><value>LDAP</value></variable> <variable type='string' name='ninegate_addomainehome' description="Nom de votre domaine AD Home" mandatory='True'><value></value></variable> - <variable type='string' name='ninegate_addomaineprofil' description="Nom de votre domaine AD Profil" mandatory='True'><value></value></variable> + <variable type='string' name='ninegate_addomaineprofil' description="Nom de votre domaine AD Profil"/> <variable type='string' name='ninegate_pwdadmin' description="Mot de passe du compte admin durant l'instance (idem valeur Cadoles ldap)" mandatory='True'><value></value></variable> <variable type='string' name='ninegate_organization' description="Nom de l'organisation principale (idem valeur Cadoles ldap)" mandatory='True'><value></value></variable> <variable type='string' name='ninegate_niveau01branche' description="Nom de la branche de Niveau 01 (idem valeur Cadoles ldap)" mandatory='True'><value>niveau01</value></variable> diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php index 3bcc1d45..9501b6b1 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php @@ -332,7 +332,9 @@ class ldapService $attrs["userAccountControl"] = 544; $attrs["homeDrive"] = "U:"; $attrs["homeDirectory"] = "\\\\".$this->addomainehome."\\".$user->getUsername(); - $attrs["profilePath"] = "\\\\".$this->addomaineprofil."\\profiles\\".$user->getUsername(); + if($this->addomaineprofil) { + $attrs["profilePath"] = "\\\\".$this->addomaineprofil."\\profiles\\".$user->getUsername(); + } } $attrs['givenName'] = $user->getFirstname(); diff --git a/tmpl/ninegate-template.yml b/tmpl/ninegate-template.yml index 5fbdef50..b3a505ce 100644 --- a/tmpl/ninegate-template.yml +++ b/tmpl/ninegate-template.yml @@ -147,7 +147,11 @@ parameters: ldap_basedn: %%ldap_base_dn %if %%getVar("ninegate_ldaptype", 'LDAP') == "AD" ldap_addomainehome: %%ninegate_addomainehome + %if %%ninegate_addomainehome^M ldap_addomaineprofil: %%ninegate_addomaineprofil + %else^M + ldap_addomaineprofil:^M + %end if^M %else ldap_addomainehome: ldap_addomaineprofil:
Révisions associées
Le profil n’est pas nécessaire dans tous les cas de figure.
Ref #35343
Historique
#1 Mis à jour par Benjamin Bohard il y a environ un an
- Assigné à mis à Benjamin Bohard
#2 Mis à jour par Benjamin Bohard il y a 12 mois
- Tâche parente mis à #35363
#3 Mis à jour par Benjamin Bohard il y a 12 mois
- Projet changé de Distribution EOLE à ninegate
- Statut changé de Nouveau à En cours
#4 Mis à jour par Benjamin Bohard il y a 12 mois
- Statut changé de En cours à À valider
- % réalisé changé de 0 à 100
#5 Mis à jour par Arnaud FORNEROT il y a 5 mois
- Statut changé de À valider à Résolu
#6 Mis à jour par Arnaud FORNEROT il y a 3 mois
- Statut changé de Résolu à Fermé
- Restant à faire (heures) mis à 0.0