From 856872815292590e0c4eff2848ea1b857a318dc4 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 8 Mar 2019 09:41:36 +0200 Subject: - [Hide Subtask boards from All Boards](https://github.com/wekan/wekan/issues/1990). - Order All Boards by Starred, Color and Title. Thanks to xet7 ! Closes #1990, Related #641 --- client/components/boards/boardsList.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js index df495bb1..8dd05913 100644 --- a/client/components/boards/boardsList.js +++ b/client/components/boards/boardsList.js @@ -25,8 +25,9 @@ BlazeComponent.extendComponent({ archived: false, 'members.userId': Meteor.userId(), type: 'board', + subtasksDefaultListId: null, }, { - sort: ['title'], + sort: { stars: -1, color: 1, title: 1 }, }); }, -- cgit v1.2.3-1-g7c22 From 7836ab83d02adc40bc59bc4393191abec0a4f636 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 8 Mar 2019 10:44:20 +0200 Subject: - Order All Boards by Starred, Color and Title and Description. Thanks to xet7 ! Closes #1990, Related #252 --- client/components/boards/boardsList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client') diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js index 8dd05913..74a8e4d4 100644 --- a/client/components/boards/boardsList.js +++ b/client/components/boards/boardsList.js @@ -27,7 +27,7 @@ BlazeComponent.extendComponent({ type: 'board', subtasksDefaultListId: null, }, { - sort: { stars: -1, color: 1, title: 1 }, + sort: { stars: -1, color: 1, title: 1, description: 1 }, }); }, -- cgit v1.2.3-1-g7c22 From ff825d6123ecfd033ccb08ce97c11cefee676104 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 8 Mar 2019 18:40:43 +0200 Subject: [HTTP header automatic login. Not tested yet.](https://github.com/wekan/wekan/issues/2019). Thanks to xet7 ! Related #2019 --- client/components/main/layouts.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'client') diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js index 6f7c914a..b3b95d32 100644 --- a/client/components/main/layouts.js +++ b/client/components/main/layouts.js @@ -101,8 +101,19 @@ Template.defaultLayout.events({ }); async function authentication(event, instance) { - const match = $('#at-field-username_and_email').val(); - const password = $('#at-field-password').val(); + + // 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 (!match || !password) return; @@ -110,9 +121,12 @@ async function authentication(event, instance) { if (result === 'password') return; - // Stop submit #at-pwd-form - event.preventDefault(); - event.stopImmediatePropagation(); + // If header login id is not set, don't try to login automatically. + if (!process.env.HEADER_LOGIN_ID) { + // Stop submit #at-pwd-form + event.preventDefault(); + event.stopImmediatePropagation(); + } switch (result) { case 'ldap': -- cgit v1.2.3-1-g7c22 From 08db39d76a2454cdc42c225597863e982ca77e82 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 8 Mar 2019 19:00:56 +0200 Subject: Fix lint errors. Thanks to xet7 ! Related #2019 --- client/components/main/layouts.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'client') 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; -- cgit v1.2.3-1-g7c22