mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Only selectively show login elements once settings is loaded
Fixes #5029
This commit is contained in:
parent
25c8f07c62
commit
ab19bbce8e
4 changed files with 11 additions and 9 deletions
|
|
@ -639,3 +639,7 @@ a:not(.disabled).is-active i.fa {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.at-pwd-form {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
@ -45,9 +45,9 @@ Template.userFormsLayout.onCreated(function () {
|
||||||
return this.stop();
|
return this.stop();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Meteor.call('isPasswordLoginDisabled', (_, result) => {
|
Meteor.call('isPasswordLoginEnabled', (_, result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
$('.at-pwd-form').hide();
|
$('.at-pwd-form').show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ const passwordField = AccountsTemplates.removeField('password');
|
||||||
const emailField = AccountsTemplates.removeField('email');
|
const emailField = AccountsTemplates.removeField('email');
|
||||||
let disableRegistration = false;
|
let disableRegistration = false;
|
||||||
let disableForgotPassword = false;
|
let disableForgotPassword = false;
|
||||||
let passwordLoginDisabled = false;
|
let passwordLoginEnabled = false;
|
||||||
let oidcRedirectionEnabled = false;
|
let oidcRedirectionEnabled = false;
|
||||||
let oauthServerUrl = "home";
|
let oauthServerUrl = "home";
|
||||||
let oauthDashboardUrl = "";
|
let oauthDashboardUrl = "";
|
||||||
|
|
@ -16,11 +16,9 @@ Meteor.call('isOidcRedirectionEnabled', (_, result) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Meteor.call('isPasswordLoginDisabled', (_, result) => {
|
Meteor.call('isPasswordLoginEnabled', (_, result) => {
|
||||||
if (result) {
|
if (result) {
|
||||||
passwordLoginDisabled = true;
|
passwordLoginEnabled = true;
|
||||||
//console.log('passwordLoginDisabled');
|
|
||||||
//console.log(result);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -521,8 +521,8 @@ if (Meteor.isServer) {
|
||||||
return process.env.DEFAULT_AUTHENTICATION_METHOD;
|
return process.env.DEFAULT_AUTHENTICATION_METHOD;
|
||||||
},
|
},
|
||||||
|
|
||||||
isPasswordLoginDisabled() {
|
isPasswordLoginEnabled() {
|
||||||
return process.env.PASSWORD_LOGIN_ENABLED === 'false';
|
return !(process.env.PASSWORD_LOGIN_ENABLED === 'false');
|
||||||
},
|
},
|
||||||
isOidcRedirectionEnabled(){
|
isOidcRedirectionEnabled(){
|
||||||
return process.env.OIDC_REDIRECTION_ENABLED === 'true' && Object.keys(loadOidcConfig("oidc")).length > 0;
|
return process.env.OIDC_REDIRECTION_ENABLED === 'true' && Object.keys(loadOidcConfig("oidc")).length > 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue