summaryrefslogtreecommitdiffstats
path: root/models/settings.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-10-03 11:50:52 +0300
committerLauri Ojansivu <x@xet7.org>2018-10-03 11:50:52 +0300
commit288800eafc91d07f859c4f59588e0b646137ccb9 (patch)
tree063166a4d05c48bf388f6836defc930e37e4e97f /models/settings.js
parent18a1d4c5c63bb8264dee15432e3c4d88d54d51b1 (diff)
downloadwekan-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.js33
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(),
+ };
+ },
});
}