diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 6d8cca634a..bf007dc2db 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-08-10 Ramon Novoa + + * include/auth/mysql.php, + include/functions_config.php, + godmode/setup/setup_auth.php: Added support fore more authentication + schemes (enterprise). + 2010-08-10 Ramon Novoa * godmode/setup/setup_auth.php: Added to repository. Authentication diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index b7f1aab6d0..e238281068 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -98,6 +98,7 @@ echo ''; $(".ad").css("display", "none"); $(".pandora").css("display", "none"); $(".babel").css("display", "none"); + $(".integria").css("display", "none"); if (auth_method != "mysql") { $(".remote").css("display", ""); diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index 4b9f79647b..d01734cb1f 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -133,6 +133,14 @@ function process_user_login ($login, $pass) { } break; + // Remote Integria + case 'integria': + if (enterprise_hook ('remote_integria_process_user_login', array ($login, $pass)) === false) { + $config["auth_error"] = "User not found in database or incorrect password"; + return false; + } + break; + // Unknown authentication method default: $config["auth_error"] = "User not found in database or incorrect password"; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 910f236f6b..42b7009db6 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -199,11 +199,21 @@ function update_config () { update_config_value ('rpandora_server', get_parameter ('rpandora_server', $config['rpandora_server'])); update_config_value ('rpandora_port', get_parameter ('rpandora_port', $config['rpandora_port'])); + update_config_value ('rpandora_dbname', get_parameter ('rpandora_dbname', $config['rpandora_dbname'])); + update_config_value ('rpandora_user', get_parameter ('rpandora_user', $config['rpandora_user'])); update_config_value ('rpandora_pass', get_parameter ('rpandora_pass', $config['rpandora_pass'])); update_config_value ('rbabel_server', get_parameter ('rbabel_server', $config['rbabel_server'])); update_config_value ('rbabel_port', get_parameter ('rbabel_port', $config['rbabel_port'])); + update_config_value ('rbabel_dbname', get_parameter ('rbabel_dbname', $config['rbabel_dbname'])); + update_config_value ('rbabel_user', get_parameter ('rbabel_user', $config['rbabel_user'])); update_config_value ('rbabel_pass', get_parameter ('rbabel_pass', $config['rbabel_pass'])); + + update_config_value ('rintegria_server', get_parameter ('rintegria_server', $config['rintegria_server'])); + update_config_value ('rintegria_port', get_parameter ('rintegria_port', $config['rintegria_port'])); + update_config_value ('rintegria_dbname', get_parameter ('rintegria_dbname', $config['rintegria_dbname'])); + update_config_value ('rintegria_user', get_parameter ('rintegria_user', $config['rintegria_user'])); + update_config_value ('rintegria_pass', get_parameter ('rintegria_pass', $config['rintegria_pass'])); } /** @@ -521,6 +531,26 @@ function process_config () { update_config_value ( 'rbabel_pass', ''); } + if (!isset ($config['rintegria_server'])) { + update_config_value ( 'rintegria_server', 'localhost'); + } + + if (!isset ($config['rintegria_port'])) { + update_config_value ( 'rintegria_port', 3306); + } + + if (!isset ($config['rintegria_dbname'])) { + update_config_value ( 'rintegria_dbname', 'integria'); + } + + if (!isset ($config['rintegria_user'])) { + update_config_value ( 'rintegria_user', 'integria'); + } + + if (!isset ($config['rintegria_pass'])) { + update_config_value ( 'rintegria_pass', ''); + } + /* Finally, check if any value was overwritten in a form */ update_config (); }