- Add LDAP. In progress.

Thanks to maximest-pierre, Akuket and xet.

Related #119
This commit is contained in:
Lauri Ojansivu 2018-10-03 11:50:52 +03:00
parent 18a1d4c5c6
commit 288800eafc
9 changed files with 139 additions and 4 deletions

View file

@ -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(),
};
},
});
}