Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-28 14:41:36 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-11-28 14:41:36 +0300
commitcfd1e045884b5fc24746ccbc3d58f785ddece401 (patch)
tree14eba96a6b556f4998f50234c9033f32ac200141 /apps/user_ldap/js
parenta0ce2c1204861e64219f6375f6ff8d13e63cfe32 (diff)
Update login filter when user filter was newly generated
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/js')
-rw-r--r--apps/user_ldap/js/wizard/wizardTabLoginFilter.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/user_ldap/js/wizard/wizardTabLoginFilter.js b/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
index 7cc35aae0aa..0eef632d85d 100644
--- a/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
+++ b/apps/user_ldap/js/wizard/wizardTabLoginFilter.js
@@ -85,6 +85,7 @@ OCA = OCA || {};
setModel: function(configModel) {
this._super(configModel);
this.configModel.on('configLoaded', this.onConfigSwitch, this);
+ this.configModel.on('configUpdated', this.onConfigUpdated, this);
this.configModel.on('receivedLdapFeature', this.onFeatureReceived, this);
},
@@ -205,6 +206,22 @@ OCA = OCA || {};
},
/**
+ * @param {WizardTabLoginFilter} view
+ * @param {Object} configuration
+ */
+ onConfigUpdated: function(view, configuration) {
+ // When the user list filter is updated in assisted mode, also
+ // update the login filter automatically.
+ if(
+ !_.isUndefined(configuration.ldap_userlist_filter)
+ && view.parsedFilterMode === view.configModel.FILTER_MODE_ASSISTED
+ && _.toArray(configuration).length === 1
+ ) {
+ view.configModel.requestWizard('ldap_login_filter');
+ }
+ },
+
+ /**
* if UserObjectClasses are found, the corresponding element will be
* updated
*