mirror of
https://github.com/wekan/wekan.git
synced 2026-02-14 04:04:21 +01:00
Fix LDAP login.
Thanks to xet7 ! Closes wekan/wekan-ldap#43, closes wekan/wekan-snap#85
This commit is contained in:
parent
fd70556c82
commit
216b3cfe01
1 changed files with 5 additions and 14 deletions
|
|
@ -101,14 +101,8 @@ Template.defaultLayout.events({
|
|||
});
|
||||
|
||||
async function authentication(event, instance) {
|
||||
|
||||
// If header login id is set, use it for login.
|
||||
// Header username = Email address
|
||||
// Header password = Login ID
|
||||
// Not user currently: request.headers[Meteor.settings.public.headerLoginFirstname]
|
||||
// and request.headers[Meteor.settings.public.headerLoginLastname]
|
||||
const match = request.headers[Meteor.settings.public.headerLoginEmail] || $('#at-field-username_and_email').val();
|
||||
const password = request.headers[Meteor.settings.public.headerLoginId] || $('#at-field-password').val();
|
||||
const match = $('#at-field-username_and_email').val();
|
||||
const password = $('#at-field-password').val();
|
||||
|
||||
if (!match || !password) return;
|
||||
|
||||
|
|
@ -116,12 +110,9 @@ async function authentication(event, instance) {
|
|||
|
||||
if (result === 'password') return;
|
||||
|
||||
// If header login id is not set, don't try to login automatically.
|
||||
if (!Meteor.settings.public.headerLoginId) {
|
||||
// Stop submit #at-pwd-form
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
// Stop submit #at-pwd-form
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
|
||||
switch (result) {
|
||||
case 'ldap':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue