Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libriciel
web-DPO
Commits
84d07c77
Commit
84d07c77
authored
May 14, 2018
by
tguillon
Browse files
Correction : Affichage du champs pour choisir le groupe LDAP
parent
f6d5538d
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Controller/RolesController.php
View file @
84d07c77
...
...
@@ -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
());
...
...
app/View/Roles/edit.ctp
View file @
84d07c77
...
...
@@ -40,7 +40,7 @@
]
]);
if
(
Configure
::
read
(
'LdapManager.Ldap.use'
)
)
{
if
(
$ldap
===
true
)
{
echo
$this
->
element
(
'LdapManager.groups'
,
[
'model'
=>
'Role'
]);
}
?>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment