mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
- Revert "Improve authentication" and "Default Authentication Method"
to make login work again. - Fixes to docker-compose.yml so that Wekan Meteor 1.6.x version would work. Most likely Meteor 1.8.x version is still broken. Thanks to xet7 !
This commit is contained in:
parent
425ae55422
commit
c502ab9500
7 changed files with 107 additions and 82 deletions
34
client/components/settings/connectionMethod.js
Normal file
34
client/components/settings/connectionMethod.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
Template.connectionMethod.onCreated(function() {
|
||||
this.authenticationMethods = new ReactiveVar([]);
|
||||
|
||||
Meteor.call('getAuthenticationsEnabled', (_, result) => {
|
||||
if (result) {
|
||||
// TODO : add a management of different languages
|
||||
// (ex {value: ldap, text: TAPi18n.__('ldap', {}, T9n.getLanguage() || 'en')})
|
||||
this.authenticationMethods.set([
|
||||
{value: 'password'},
|
||||
// Gets only the authentication methods availables
|
||||
...Object.entries(result).filter((e) => e[1]).map((e) => ({value: e[0]})),
|
||||
]);
|
||||
}
|
||||
|
||||
// If only the default authentication available, hides the select boxe
|
||||
const content = $('.at-form-authentication');
|
||||
if (!(this.authenticationMethods.get().length > 1)) {
|
||||
content.hide();
|
||||
} else {
|
||||
content.show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Template.connectionMethod.onRendered(() => {
|
||||
// Moves the select boxe in the first place of the at-pwd-form div
|
||||
$('.at-form-authentication').detach().prependTo('.at-pwd-form');
|
||||
});
|
||||
|
||||
Template.connectionMethod.helpers({
|
||||
authentications() {
|
||||
return Template.instance().authenticationMethods.get();
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue