Commit 84d07c77 authored by tguillon's avatar tguillon
Browse files

Correction : Affichage du champs pour choisir le groupe LDAP

parent f6d5538d
......@@ -25,6 +25,8 @@ App::uses('ListeDroit', 'Model');
class RolesController extends AppController {
public $uses = [
'Authentification',
'ConnecteurLdap',
'Role',
'ListeDroit',
'RoleDroit',
......@@ -262,6 +264,32 @@ class RolesController extends AppController {
'{n}.RoleDroit.liste_droit_id'
);
}
$authentificationLdap = $this->Authentification->find('first', [
'conditions' => [
'organisation_id' => $this->Session->read('Organisation.id')
],
'fields' => [
'use'
]
]);
$useLdap = $this->ConnecteurLdap->find('first', [
'conditions' => [
'organisation_id' => $this->Session->read('Organisation.id')
],
'fields' => [
'use'
]
]);
if ($useLdap == true && $authentificationLdap == true) {
$ldap = true;
} else {
$ldap = false;
}
$this->set('ldap', $ldap);
$this->GroupManager->getGroupsRole($id);
$this->set('options', $this->_optionsAddEdit());
......
......@@ -40,7 +40,7 @@
]
]);
if (Configure::read('LdapManager.Ldap.use')) {
if ($ldap === true) {
echo $this->element('LdapManager.groups', ['model' => 'Role']);
}
?>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment