summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/components/main/layouts.js8
-rw-r--r--client/components/settings/settingBody.js15
-rw-r--r--models/settings.js2
-rw-r--r--server/migrations.js6
-rw-r--r--server/publications/settings.js4
5 files changed, 15 insertions, 20 deletions
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index 2e057568..73da80e5 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -28,7 +28,7 @@ Template.userFormsLayout.onCreated(function() {
onReady() {
instance.currentSetting.set(Settings.findOne());
return this.stop();
- }
+ },
});
});
@@ -140,16 +140,16 @@ function getUserAuthenticationMethod(defaultAuthenticationMethod, match) {
Meteor.subscribe('user-authenticationMethod', match, {
onReady() {
const user = Users.findOne();
-
+
const authenticationMethod = user
? user.authenticationMethod
: defaultAuthenticationMethod;
-
+
resolve(authenticationMethod);
},
});
} catch(error) {
resolve(defaultAuthenticationMethod);
}
- })
+ });
}
diff --git a/client/components/settings/settingBody.js b/client/components/settings/settingBody.js
index 1d05a8c7..2f58d551 100644
--- a/client/components/settings/settingBody.js
+++ b/client/components/settings/settingBody.js
@@ -156,7 +156,7 @@ BlazeComponent.extendComponent({
customHTMLafterBodyStart,
customHTMLbeforeBodyEnd,
displayAuthenticationMethod,
- defaultAuthenticationMethod
+ defaultAuthenticationMethod,
},
});
} catch (e) {
@@ -171,17 +171,14 @@ BlazeComponent.extendComponent({
sendSMTPTestEmail() {
Meteor.call('sendSMTPTestEmail', (err, ret) => {
- if (!err && ret) { /* eslint-disable no-console */
+ if (!err && ret) {
const message = `${TAPi18n.__(ret.message)}: ${ret.email}`;
- console.log(message);
alert(message);
} else {
const reason = err.reason || '';
const message = `${TAPi18n.__(err.error)}\n${reason}`;
- console.log(message, err);
alert(message);
}
- /* eslint-enable no-console */
});
},
@@ -196,7 +193,7 @@ BlazeComponent.extendComponent({
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
'click a.js-toggle-hide-logo': this.toggleHideLogo,
'click button.js-save-layout': this.saveLayout,
- 'click a.js-toggle-display-authentication-method': this.toggleDisplayAuthenticationMethod
+ 'click a.js-toggle-display-authentication-method': this.toggleDisplayAuthenticationMethod,
}];
},
}).register('setting');
@@ -292,8 +289,6 @@ Template.selectAuthenticationMethod.helpers({
return Template.instance().authenticationMethods.get();
},
isSelected(match) {
- console.log('this : ', this);
- console.log('instance : ', Template.instance());
return Template.instance().data.authenticationMethod === match;
- }
-}); \ No newline at end of file
+ },
+});
diff --git a/models/settings.js b/models/settings.js
index 5dd28448..4fcc36ac 100644
--- a/models/settings.js
+++ b/models/settings.js
@@ -93,7 +93,7 @@ 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, displayAuthenticationMethod: true,
+ }, createdAt: now, modifiedAt: now, displayAuthenticationMethod: true,
defaultAuthenticationMethod: 'password'};
Settings.insert(defaultSetting);
}
diff --git a/server/migrations.js b/server/migrations.js
index a18ebd71..8dcd892a 100644
--- a/server/migrations.js
+++ b/server/migrations.js
@@ -408,7 +408,7 @@ Migrations.add('add-displayAuthenticationMethod', () => {
$set: {
displayAuthenticationMethod: true,
},
- }, noValidateMulti)
+ }, noValidateMulti);
});
Migrations.add('add-defaultAuthenticationMethod', () => {
@@ -420,5 +420,5 @@ Migrations.add('add-defaultAuthenticationMethod', () => {
$set: {
defaultAuthenticationMethod: 'password',
},
- }, noValidateMulti)
-}); \ No newline at end of file
+ }, noValidateMulti);
+});
diff --git a/server/publications/settings.js b/server/publications/settings.js
index 4e587f4c..a8f8a969 100644
--- a/server/publications/settings.js
+++ b/server/publications/settings.js
@@ -7,8 +7,8 @@ Meteor.publish('setting', () => {
customHTMLafterBodyStart: 1,
customHTMLbeforeBodyEnd: 1,
displayAuthenticationMethod: 1,
- defaultAuthenticationMethod: 1
- }
+ defaultAuthenticationMethod: 1,
+ },
});
});