Improve authentication

This commit is contained in:
guillaume 2019-02-01 19:00:44 +01:00
parent 6f0e0748e1
commit c2118f4830
7 changed files with 169 additions and 67 deletions

View file

@ -398,3 +398,27 @@ Migrations.add('add-custom-html-before-body-end', () => {
},
}, noValidateMulti);
});
Migrations.add('add-displayAuthenticationMethod', () => {
Settings.update({
displayAuthenticationMethod: {
$exists: false,
},
}, {
$set: {
displayAuthenticationMethod: true,
},
}, noValidateMulti)
});
Migrations.add('add-defaultAuthenticationMethod', () => {
Settings.update({
defaultAuthenticationMethod: {
$exists: false,
},
}, {
$set: {
defaultAuthenticationMethod: 'password',
},
}, noValidateMulti)
});

View file

@ -1,5 +1,15 @@
Meteor.publish('setting', () => {
return Settings.find({}, {fields:{disableRegistration: 1, productName: 1, hideLogo: 1, customHTMLafterBodyStart: 1, customHTMLbeforeBodyEnd: 1}});
return Settings.find({}, {
fields:{
disableRegistration: 1,
productName: 1,
hideLogo: 1,
customHTMLafterBodyStart: 1,
customHTMLbeforeBodyEnd: 1,
displayAuthenticationMethod: 1,
defaultAuthenticationMethod: 1
}
});
});
Meteor.publish('mailServer', function () {