added new fields to saml configuration and added check to not allow user creation with all group in case an empty value was specified in group name attribute input

This commit is contained in:
alejandro-campos 2019-06-27 17:42:29 +02:00
parent 2a69e3a75e
commit 3d75e045f9
1 changed files with 24 additions and 0 deletions

View File

@ -668,10 +668,22 @@ function config_update_config()
$error_update[] = __('Saml group name parameter'); $error_update[] = __('Saml group name parameter');
} }
if (!config_update_value('saml_attr_type', (bool) get_parameter('saml_attr_type'))) {
$error_update[] = __('Saml attr type parameter');
}
if (!config_update_value('saml_profiles_and_tags', get_parameter('saml_profiles_and_tags'))) { if (!config_update_value('saml_profiles_and_tags', get_parameter('saml_profiles_and_tags'))) {
$error_update[] = __('Saml profiles and tags parameter'); $error_update[] = __('Saml profiles and tags parameter');
} }
if (!config_update_value('saml_profile', get_parameter('saml_profile'))) {
$error_update[] = __('Saml profile parameters');
}
if (!config_update_value('saml_tag', get_parameter('saml_tag'))) {
$error_update[] = __('Saml tag parameter');
}
if (!config_update_value('saml_profile_tag_separator', get_parameter('saml_profile_tag_separator'))) { if (!config_update_value('saml_profile_tag_separator', get_parameter('saml_profile_tag_separator'))) {
$error_update[] = __('Saml profile and tag separator'); $error_update[] = __('Saml profile and tag separator');
} }
@ -2404,10 +2416,22 @@ function config_process_config()
config_update_value('saml_group_name', ''); config_update_value('saml_group_name', '');
} }
if (!isset($config['saml_attr_type'])) {
config_update_value('saml_attr_type', false);
}
if (!isset($config['saml_profiles_and_tags'])) { if (!isset($config['saml_profiles_and_tags'])) {
config_update_value('saml_profiles_and_tags', ''); config_update_value('saml_profiles_and_tags', '');
} }
if (!isset($config['saml_profile'])) {
config_update_value('saml_profile', '');
}
if (!isset($config['saml_tag'])) {
config_update_value('saml_tag', '');
}
if (!isset($config['saml_profile_tag_separator'])) { if (!isset($config['saml_profile_tag_separator'])) {
config_update_value('saml_profile_tag_separator', ''); config_update_value('saml_profile_tag_separator', '');
} }