diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-03-14 00:25:40 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-03-14 00:25:40 +0200 |
commit | 32f6de1eecfc6d93e7997da383d12db6c0ab2cd4 (patch) | |
tree | fe5c8fe413d68b9ac2c0e206b016b80fd3a4e79d /client/components/main/layouts.js | |
parent | 8671f08a0ea6ca24b72dcfd851d9587063ccdcbe (diff) | |
download | wekan-32f6de1eecfc6d93e7997da383d12db6c0ab2cd4.tar.gz wekan-32f6de1eecfc6d93e7997da383d12db6c0ab2cd4.tar.bz2 wekan-32f6de1eecfc6d93e7997da383d12db6c0ab2cd4.zip |
Try to fix [LDAP Login: "Login forbidden", ReferenceError: req is not defined](https://github.com/wekan/wekan-ldap/issues/44).
Please test.
Thanks to xet7 !
Closes wekan/wekan-ldap#44
Diffstat (limited to 'client/components/main/layouts.js')
-rw-r--r-- | client/components/main/layouts.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index 4305de7c..d5b59b5f 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -105,10 +105,10 @@ 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: req.headers[process.env.HEADER_LOGIN_FIRSTNAME] - // and req.headers[process.env.HEADER_LOGIN_LASTNAME] - const match = req.headers[process.env.HEADER_LOGIN_EMAIL] || $('#at-field-username_and_email').val(); - const password = req.headers[process.env.HEADER_LOGIN_ID] || $('#at-field-password').val(); + // 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(); if (!match || !password) return; @@ -117,7 +117,7 @@ async function authentication(event, instance) { if (result === 'password') return; // If header login id is not set, don't try to login automatically. - if (!process.env.HEADER_LOGIN_ID) { + if (!Meteor.settings.public.headerLoginId) { // Stop submit #at-pwd-form event.preventDefault(); event.stopImmediatePropagation(); |