Commit c0bce6fb authored by Théo GUILLON's avatar Théo GUILLON
Browse files

Merge branch '1-mettre-en-place-le-ldap' into 'master'

Resolve "Mettre en place le LDAP"

Closes #1

See merge request web-DPO/web-DPO!2
parents 86770b50 10a70cf9
......@@ -49,28 +49,7 @@ class UsersController extends AppController {
];
public $components = [
'RequestHandler',
// 'Auth' => [
// 'mapActions' => [
// 'read' => [
// 'getAdresse',
// 'getCP',
// 'getNom',
// 'getPrenom',
// 'getVille',
// 'admin_view',
// 'admin_index',
// 'manager_index',
// 'manager_view'
// ],
// 'changeFormatSortie',
// 'changeUserMdp',
// 'create' => ['admin_add', 'admin_changeMdp', 'manager_add', 'manager_changeMdp', 'admin_acl_edit', 'manager_acl_edit'],
// 'update' => ['admin_edit', 'manager_edit'],
// 'delete' => ['admin_delete', 'manager_delete', 'admin_enable', 'manager_enable', 'admin_disable', 'manager_disable'],
// 'allow' => ['login', 'logout', 'casLogin', 'casLogout', 'changeServiceEmetteur', 'changeTheme', 'view']
// ]
// ]
'RequestHandler'
];
/**
......@@ -722,11 +701,6 @@ class UsersController extends AppController {
if (!empty($idUser)) {
$query = [
'fields' => [
'OrganisationUser.id',
'OrganisationUser.user_id',
'OrganisationUser.organisation_id',
// //
'ConnecteurLdap.organisation_id',
'ConnecteurLdap.password',
'ConnecteurLdap.login',
'ConnecteurLdap.host',
......@@ -746,7 +720,6 @@ class UsersController extends AppController {
'ConnecteurLdap.telfixe',
'ConnecteurLdap.telmobile',
'ConnecteurLdap.active',
'Authentification.organisation_id',
'Authentification.port',
'Authentification.use',
'Authentification.type',
......@@ -779,7 +752,7 @@ class UsersController extends AppController {
$ping_fall_over = @fsockopen($host_fall_over, $port_fall_over, $errno_fall_over, $errstr_fall_over, 30);
@fclose($ping_fall_over);
if($ping && $ping_fall_over){
if ($ping || $ping_fall_over) {
if ($autorisationLogin === false) {
$connecteurLdap['ConnecteurLdap']['fields']['User'] = [
'username' => $connecteurLdap['ConnecteurLdap']['username'],
......
Supports Markdown
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