mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Improve LDAP tests and preview process
This commit is contained in:
parent
6e0958b3c3
commit
ae084ae0bb
4 changed files with 702 additions and 697 deletions
|
@ -57,12 +57,12 @@ export default Component.extend(ModalMixin, Notifier, {
|
|||
ldapErrorAttributeGroupMember: computed('ldapConfig.{groupFilter,attributeGroupMember}', function() {
|
||||
return is.not.empty(this.get('ldapConfig.groupFilter')) && is.empty(this.get('ldapConfig.attributeGroupMember'));
|
||||
}),
|
||||
ldapPreview: null,
|
||||
ldapConfig: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
let constants = this.get('constants');
|
||||
|
||||
this.keycloakConfig = {
|
||||
url: '',
|
||||
realm: '',
|
||||
|
@ -74,27 +74,6 @@ export default Component.extend(ModalMixin, Notifier, {
|
|||
disableLogout: false,
|
||||
defaultPermissionAddSpace: false
|
||||
};
|
||||
|
||||
this.ldapConfig = {
|
||||
serverType: constants.AuthProvider.ServerTypeLDAP,
|
||||
serverHost: '',
|
||||
serverPort: 389,
|
||||
encryptionType: constants.AuthProvider.EncryptionTypeStartTLS,
|
||||
baseDN: "",
|
||||
bindDN: "cn=admin,dc=planetexpress,dc=com",
|
||||
bindPassword: "GoodNewsEveryone",
|
||||
userFilter: "(|(objectClass=person)(objectClass=user)(objectClass=inetOrgPerson))",
|
||||
groupFilter: "(&(objectClass=group)(|(cn=ship_crew)(cn=admin_staff)))",
|
||||
attributeUserRDN: "uid",
|
||||
attributeUserFirstname: "givenName",
|
||||
attributeUserLastname: "sn",
|
||||
attributeUserEmail: "mail",
|
||||
attributeUserDisplayName: "",
|
||||
attributeUserGroupName: "",
|
||||
attributeGroupMember: "member",
|
||||
disableLogout: false,
|
||||
defaultPermissionAddSpace: false
|
||||
};
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
|
@ -103,6 +82,8 @@ export default Component.extend(ModalMixin, Notifier, {
|
|||
let provider = this.get('authProvider');
|
||||
let constants = this.get('constants');
|
||||
|
||||
this.set('ldapPreview', {isError: true, message: 'Unable to connect'});
|
||||
|
||||
switch (provider) {
|
||||
case constants.AuthProvider.Documize:
|
||||
// nothing to do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue