summaryrefslogtreecommitdiffstats
path: root/models/settings.js
diff options
context:
space:
mode:
authorguillaume <guillaume.cassou@supinfo.com>2018-11-09 17:46:02 +0100
committerguillaume <guillaume.cassou@supinfo.com>2018-11-09 17:46:02 +0100
commit893329d9c6d33aa5572e268e8f951400a2446303 (patch)
tree2ff09cdb61e14b1479f2fbe187bd6f2477ce5aff /models/settings.js
parentcb091c8a54dc3b9b721a0474f4c821e0b451f3d6 (diff)
downloadwekan-893329d9c6d33aa5572e268e8f951400a2446303.tar.gz
wekan-893329d9c6d33aa5572e268e8f951400a2446303.tar.bz2
wekan-893329d9c6d33aa5572e268e8f951400a2446303.zip
patch authentication
Diffstat (limited to 'models/settings.js')
-rw-r--r--models/settings.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/models/settings.js b/models/settings.js
index 35d71533..6c9f5a53 100644
--- a/models/settings.js
+++ b/models/settings.js
@@ -76,6 +76,7 @@ if (Meteor.isServer) {
}, createdAt: now, modifiedAt: now};
Settings.insert(defaultSetting);
}
+
const newSetting = Settings.findOne();
if (!process.env.MAIL_URL && newSetting.mailUrl())
process.env.MAIL_URL = newSetting.mailUrl();
@@ -235,6 +236,12 @@ if (Meteor.isServer) {
cas: isCasEnabled(),
};
},
+
+ getDefaultAuthenticationMethod() {
+ return process.env.DEFAULT_AUTHENTICATION_METHOD;
+ },
+
+ // TODO: patch error : did not check all arguments during call
logoutWithTimer(userId) {
if (process.env.LOGOUT_WITH_TIMER) {
Jobs.run('logOut', userId, {
@@ -257,6 +264,7 @@ if (Meteor.isServer) {
{_id: userId},
{$set: {'services.resume.loginTokens': []}}
);
+ this.success();
},
});
}