Some changes in saml login system.
This commit is contained in:
parent
e44ba856ee
commit
e01d36255d
|
@ -87,12 +87,6 @@ echo '
|
||||||
html_print_image ($config['homeurl'] . "/images/pandora_login.png", false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
|
html_print_image ($config['homeurl'] . "/images/pandora_login.png", false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
|
||||||
}
|
}
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
echo '<div class="login_button" style="text-align: center;">';
|
|
||||||
if ($config['auth'] == 'saml') {
|
|
||||||
html_print_submit_button(__("Login with SAML"), "login_button_saml", false, 'class="sub login_boton"');
|
|
||||||
|
|
||||||
}
|
|
||||||
echo '</div>';
|
|
||||||
|
|
||||||
// This prints the current pandora console version.
|
// This prints the current pandora console version.
|
||||||
// For stable/live function it might be wise to comment it out
|
// For stable/live function it might be wise to comment it out
|
||||||
|
@ -126,7 +120,12 @@ echo '
|
||||||
html_print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login login_password"', false, true);
|
html_print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login login_password"', false, true);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<div class="login_button">';
|
echo '<div class="login_button">';
|
||||||
html_print_submit_button(__("Login") . ' >', "login_button", false, 'class="sub next_login"');
|
if ($config['auth'] == 'saml') {
|
||||||
|
html_print_submit_button(__("Login with SAML"), "login_button_saml", false, 'class="sub login_boton"');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
html_print_submit_button(__("Login") . ' >', "login_button", false, 'class="sub next_login"');
|
||||||
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
break;
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
|
|
|
@ -252,8 +252,11 @@ echo '</form>';
|
||||||
function show_selected_rows (event) {
|
function show_selected_rows (event) {
|
||||||
var auth_method = $(this).val();
|
var auth_method = $(this).val();
|
||||||
|
|
||||||
if ((auth_method !== 'mysql') && (auth_method !== 'saml')) {
|
if (auth_method !== 'mysql') {
|
||||||
$('tr.remote').show();
|
$('tr.remote').show();
|
||||||
|
if (auth_method == 'saml') {
|
||||||
|
$('tr#table2-autocreate_remote_users').hide();
|
||||||
|
}
|
||||||
show_autocreate_options(null);
|
show_autocreate_options(null);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -181,9 +181,14 @@ if (! isset ($config['id_user']) && isset ($_GET["login"])) {
|
||||||
|
|
||||||
$login_button_saml = get_parameter("login_button_saml", false);
|
$login_button_saml = get_parameter("login_button_saml", false);
|
||||||
if (($config['auth'] == 'saml') && $login_button_saml) {
|
if (($config['auth'] == 'saml') && $login_button_saml) {
|
||||||
|
if (is_user_admin($nick)) {
|
||||||
|
$nick_in_db = $nick;
|
||||||
|
}
|
||||||
|
else {
|
||||||
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
|
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
|
||||||
$saml_user_id = saml_process_user_login();
|
$saml_user_id = saml_process_user_login();
|
||||||
$nick_in_db = $saml_user_id;
|
$nick_in_db = $saml_user_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// process_user_login is a virtual function which should be defined in each auth file.
|
// process_user_login is a virtual function which should be defined in each auth file.
|
||||||
|
|
Loading…
Reference in New Issue