summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-03-08 19:17:33 +0200
committerLauri Ojansivu <x@xet7.org>2019-03-08 19:17:33 +0200
commit0155c7d8ce5591cab7c9cd4ace2be6cbd741f9a1 (patch)
treef1ef6c375070c2dc9531c6a01418a69c1834ca5f /client
parent64fca5893eb02cc696272361872953f253cf07af (diff)
parent98031aacce0d85234377e0f01a43d211c079c614 (diff)
downloadwekan-0155c7d8ce5591cab7c9cd4ace2be6cbd741f9a1.tar.gz
wekan-0155c7d8ce5591cab7c9cd4ace2be6cbd741f9a1.tar.bz2
wekan-0155c7d8ce5591cab7c9cd4ace2be6cbd741f9a1.zip
Merge branch 'edge' into meteor-1.8
Diffstat (limited to 'client')
-rw-r--r--client/components/boards/boardsList.js3
-rw-r--r--client/components/main/layouts.js19
2 files changed, 16 insertions, 6 deletions
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index df495bb1..74a8e4d4 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, description: 1 },
});
},
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index 6f7c914a..4305de7c 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -101,8 +101,14 @@ 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.
+ // 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;
@@ -110,9 +116,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':