Merge branch 'edge' into meteor-1.8

This commit is contained in:
Lauri Ojansivu 2019-03-08 19:17:33 +02:00
commit 0155c7d8ce
16 changed files with 143 additions and 39 deletions

View file

@ -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 },
});
},

View file

@ -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':