From db13ecbb3908617ad606ec54668de2411bc80050 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 8 Apr 2019 11:55:58 +0200 Subject: [PATCH] Added token save profile user Former-commit-id: 442a51cfbe7ac9730e9fd9c2c1ee16b6609e5f6a --- pandora_console/include/auth/mysql.php | 3 +-- pandora_console/include/functions_config.php | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index aab0b4c9e4..63daae2967 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -1252,9 +1252,8 @@ function check_permission_ldap( function fill_permissions_ldap($sr) { global $config; - $permissions = []; - if (!$config['ldap_advanced_config']) { + if ($config['autocreate_remote_users'] && $config['ldap_save_profile']) { $permissions[0]['profile'] = $config['default_remote_profile']; $permissions[0]['groups'][] = $config['default_remote_group']; $permissions[0]['tags'] = $config['default_assign_tags']; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 5435de5b8a..7b3c4b632b 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -604,6 +604,10 @@ function config_update_config() config_update_value('ldap_save_password', 1); } + if (!config_update_value('ldap_save_profile', get_parameter('ldap_save_profile'))) { + $error_update[] = __('Save profile'); + } + if (!config_update_value('rpandora_server', get_parameter('rpandora_server'))) { $error_update[] = __('MySQL host'); }