summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-03-08 19:00:56 +0200
committerLauri Ojansivu <x@xet7.org>2019-03-08 19:00:56 +0200
commit08db39d76a2454cdc42c225597863e982ca77e82 (patch)
treeb23d01dbcebdf09246904e4b0bffb49d1412884a /client
parentda267e14880479e05e6d0a013ecb43dc97ce077c (diff)
downloadwekan-08db39d76a2454cdc42c225597863e982ca77e82.tar.gz
wekan-08db39d76a2454cdc42c225597863e982ca77e82.tar.bz2
wekan-08db39d76a2454cdc42c225597863e982ca77e82.zip
Fix lint errors.
Thanks to xet7 ! Related #2019
Diffstat (limited to 'client')
-rw-r--r--client/components/main/layouts.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index b3b95d32..4305de7c 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -102,18 +102,13 @@ Template.defaultLayout.events({
async function authentication(event, instance) {
- // If header login id is set, use it for login
- if (process.env.HEADER_LOGIN_ID) {
- // Header username = Email address
- const match = req.headers[process.env.HEADER_LOGIN_EMAIL];
- // Header password = Login ID
- const password = req.headers[process.env.HEADER_LOGIN_ID];
- //const headerLoginFirstname = req.headers[process.env.HEADER_LOGIN_FIRSTNAME];
- //const headerLoginLastname = req.headers[process.env.HEADER_LOGIN_LASTNAME];
- } else {
- const match = $('#at-field-username_and_email').val();
- const password = $('#at-field-password').val();
- }
+ // 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();
if (!match || !password) return;