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

@ -40,6 +40,14 @@ Settings.attachSchema(new SimpleSchema({
type: String,
optional: true,
},
displayAuthenticationMethod: {
type: Boolean,
optional: true,
},
defaultAuthenticationMethod: {
type: String,
optional: false,
},
hideLogo: {
type: Boolean,
optional: true,
@ -85,7 +93,8 @@ if (Meteor.isServer) {
const from = `Boards Support <support@${domain}>`;
const defaultSetting = {disableRegistration: false, mailServer: {
username: '', password: '', host: '', port: '', enableTLS: false, from,
}, createdAt: now, modifiedAt: now};
}, createdAt: now, modifiedAt: now, displayAuthenticationMethod: true,
defaultAuthenticationMethod: 'password'};
Settings.insert(defaultSetting);
}
const newSetting = Settings.findOne();