diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-10-03 11:50:52 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-10-03 11:50:52 +0300 |
commit | 288800eafc91d07f859c4f59588e0b646137ccb9 (patch) | |
tree | 063166a4d05c48bf388f6836defc930e37e4e97f /models/settings.js | |
parent | 18a1d4c5c63bb8264dee15432e3c4d88d54d51b1 (diff) | |
download | wekan-288800eafc91d07f859c4f59588e0b646137ccb9.tar.gz wekan-288800eafc91d07f859c4f59588e0b646137ccb9.tar.bz2 wekan-288800eafc91d07f859c4f59588e0b646137ccb9.zip |
- Add LDAP. In progress.
Thanks to maximest-pierre, Akuket and xet.
Related #119
Diffstat (limited to 'models/settings.js')
-rw-r--r-- | models/settings.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/models/settings.js b/models/settings.js index 3b9b4eae..f7c4c85d 100644 --- a/models/settings.js +++ b/models/settings.js @@ -128,6 +128,18 @@ if (Meteor.isServer) { } } + function isLdapEnabled() { + return process.env.LDAP_ENABLE === 'true'; + } + + function isOauth2Enabled() { + return process.env.OAUTH2_ENABLED === 'true'; + } + + function isCasEnabled() { + return process.env.CAS_ENABLED === 'true'; + } + Meteor.methods({ sendInvitation(emails, boards) { check(emails, [String]); @@ -197,5 +209,26 @@ if (Meteor.isServer) { withUserName: process.env.MATOMO_WITH_USERNAME || false, }; }, + + _isLdapEnabled() { + return isLdapEnabled(); + }, + + _isOauth2Enabled() { + return isOauth2Enabled(); + }, + + _isCasEnabled() { + return isCasEnabled(); + }, + + // Gets all connection methods to use it in the Template + getConnectionsEnabled() { + return { + ldap: isLdapEnabled(), + oauth2: isOauth2Enabled(), + cas: isCasEnabled(), + }; + }, }); } |