diff options
author | guillaume <guillaume.cassou@supinfo.com> | 2018-11-22 18:00:21 +0100 |
---|---|---|
committer | guillaume <guillaume.cassou@supinfo.com> | 2018-11-22 18:00:21 +0100 |
commit | f23448be3340c56f6fae85b19a52aecf55e4753b (patch) | |
tree | 0acea2f3c2286322c13a429c43baf5081b781326 /models/settings.js | |
parent | a27c16e434f413fe23279b2656b77649c4f202a9 (diff) | |
download | wekan-f23448be3340c56f6fae85b19a52aecf55e4753b.tar.gz wekan-f23448be3340c56f6fae85b19a52aecf55e4753b.tar.bz2 wekan-f23448be3340c56f6fae85b19a52aecf55e4753b.zip |
revert changes for patch authentication
Diffstat (limited to 'models/settings.js')
-rw-r--r-- | models/settings.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/models/settings.js b/models/settings.js index 52212809..8d067c6d 100644 --- a/models/settings.js +++ b/models/settings.js @@ -239,5 +239,35 @@ 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, { + in: { + days: process.env.LOGOUT_IN, + }, + on: { + hour: process.env.LOGOUT_ON_HOURS, + minute: process.env.LOGOUT_ON_MINUTES, + }, + priority: 1, + }); + } + }, + }); + + Jobs.register({ + logOut(userId) { + Meteor.users.update( + {_id: userId}, + {$set: {'services.resume.loginTokens': []}} + ); + this.success(); + }, }); } |