mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Support dual login via LDAP and forms authentication
Closes #256 as we now support dual login -- LDAP and forms authentication. Also bumped the vendored library to LDAP.v3 as it contains bug fixes.
This commit is contained in:
parent
faf9a555d2
commit
b054addb9c
42 changed files with 977 additions and 582 deletions
|
@ -15,8 +15,9 @@ import Mixin from '@ember/object/mixin';
|
|||
export default Mixin.create({
|
||||
appMeta: service(),
|
||||
isAuthProviderDocumize: true,
|
||||
IsAuthProviderKeycloak: false,
|
||||
IsAuthProviderLDAP: false,
|
||||
isAuthProviderKeycloak: false,
|
||||
isAuthProviderLDAP: false,
|
||||
isDualAuth: false,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
@ -25,5 +26,16 @@ export default Mixin.create({
|
|||
this.set('isAuthProviderDocumize', this.get('appMeta.authProvider') === constants.AuthProvider.Documize);
|
||||
this.set('isAuthProviderKeycloak', this.get('appMeta.authProvider') === constants.AuthProvider.Keycloak);
|
||||
this.set('isAuthProviderLDAP', this.get('appMeta.authProvider') === constants.AuthProvider.LDAP);
|
||||
|
||||
if (this.get('appMeta.authProvider') === constants.AuthProvider.LDAP) {
|
||||
let config = this.get('appMeta.authConfig');
|
||||
|
||||
if (!_.isUndefined(config) && !_.isNull(config) && !_.isEmpty(config) ) {
|
||||
config = JSON.parse(config);
|
||||
this.set('isDualAuth', config.allowFormsAuth);
|
||||
} else {
|
||||
this.set('isDualAuth', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue