mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Preview LDAP connection results
This commit is contained in:
parent
1ce7e53398
commit
63b17f9b88
5 changed files with 63 additions and 20 deletions
|
@ -15,11 +15,13 @@ import { set } from '@ember/object';
|
|||
import { copy } from '@ember/object/internals';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Notifier from '../../mixins/notifier';
|
||||
import ModalMixin from '../../mixins/modal';
|
||||
import encoding from '../../utils/encoding';
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(Notifier, {
|
||||
export default Component.extend(ModalMixin, Notifier, {
|
||||
appMeta: service(),
|
||||
globalSvc: service('global'),
|
||||
|
||||
isDocumizeProvider: computed('authProvider', function() {
|
||||
return this.get('authProvider') === this.get('constants').AuthProvider.Documize;
|
||||
|
@ -156,6 +158,19 @@ export default Component.extend(Notifier, {
|
|||
this.set('ldapConfig.encryptionType', e);
|
||||
},
|
||||
|
||||
onLDAPPreview() {
|
||||
this.showWait();
|
||||
|
||||
let config = this.get('ldapConfig');
|
||||
config.serverPort = parseInt(this.get('ldapConfig.serverPort'));
|
||||
|
||||
this.get('globalSvc').previewLDAP(config).then((preview) => {
|
||||
this.set('ldapPreview', preview);
|
||||
this.modalOpen("#ldap-preview-modal", {"show": true});
|
||||
this.showDone();
|
||||
});
|
||||
},
|
||||
|
||||
onSave() {
|
||||
let constants = this.get('constants');
|
||||
let provider = this.get('authProvider');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue