From 77e824552d2bf647c4302d2b88aeb389f8ef6dca Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Thu, 11 Dec 2014 16:12:27 +0100 Subject: [PATCH] Added an option to allow the users to enable the 2 step auth --- pandora_console/godmode/setup/setup_auth.php | 9 +++++++++ pandora_console/include/functions_config.php | 2 ++ 2 files changed, 11 insertions(+) diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index 2c29c91633..1a077e1542 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -94,6 +94,15 @@ if (enterprise_installed()) { add_enterprise_auth_options($table, 12); } +// Enable double authentication +$row = array(); +$row[] = __('Double authentication') + . ui_print_help_tip(__("If this option is enabled, the users can use double authentication with their accounts"), true); +$row[] = __('Yes').' '.html_print_radio_button('double_auth_enabled', 1, '', $config['double_auth_enabled'], true) + .'  ' + . __('No').' '.html_print_radio_button('double_auth_enabled', 0, '', $config['double_auth_enabled'], true); +$table->data[] = $row; + echo '
'; html_print_input_hidden ('update_config', 1); html_print_table ($table); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 4d87e9b815..daf12e9367 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -321,6 +321,8 @@ function config_update_config () { $error_update[] = __('User'); if (!config_update_value ('rintegria_pass', get_parameter ('rintegria_pass'))) $error_update[] = __('Password'); + if (!config_update_value ('double_auth_enabled', get_parameter ('double_auth_enabled'))) + $error_update[] = __('Double authentication'); ///////////// break; case 'perf':