Some changes in saml login system.
This commit is contained in:
parent
4979305e5b
commit
2c1e80d913
|
@ -127,7 +127,9 @@ echo '<div id="login_in">';
|
||||||
if ($config['auth'] == 'saml') {
|
if ($config['auth'] == 'saml') {
|
||||||
html_print_submit_button(__("Login with SAML"), "login_button_saml", false, 'class="sub login_boton"');
|
html_print_submit_button(__("Login with SAML"), "login_button_saml", false, 'class="sub login_boton"');
|
||||||
}
|
}
|
||||||
html_print_submit_button(__("Login"), "login_button", false, 'class="sub next_login"');
|
else {
|
||||||
|
html_print_submit_button(__("Login"), "login_button", false, 'class="sub next_login"');
|
||||||
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
break;
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
|
|
|
@ -253,14 +253,16 @@ 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 {
|
||||||
$('tr.remote').hide();
|
$('tr.remote').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide all the auth methods (except mysql)
|
// Hide all the auth methods (except mysql)
|
||||||
_.each(auth_methods, function(value, key) {
|
_.each(auth_methods, function(value, key) {
|
||||||
if (value !== 'mysql')
|
if (value !== 'mysql')
|
||||||
|
|
|
@ -289,9 +289,14 @@ if (! isset ($config['id_user'])) {
|
||||||
$expired_pass = false;
|
$expired_pass = false;
|
||||||
}
|
}
|
||||||
else if (($config['auth'] == 'saml') && $login_button_saml) {
|
else if (($config['auth'] == 'saml') && $login_button_saml) {
|
||||||
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
|
if (is_user_admin($nick)) {
|
||||||
$saml_user_id = saml_process_user_login();
|
$nick_in_db = $nick;
|
||||||
$nick_in_db = $saml_user_id;
|
}
|
||||||
|
else {
|
||||||
|
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
|
||||||
|
$saml_user_id = saml_process_user_login();
|
||||||
|
$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