LdapFilter.prototype.activate = function() {
if(this.activated) {
+ // might be necessary, if configuration changes happened.
+ this.findFeatures();
return;
}
this.activated = true;
}
};
+/**
+ * resets this.foundFeatures so that LDAP queries can be fired again to retrieve
+ * objectClasses, groups, etc.
+ */
+LdapFilter.prototype.reAllowFeatureLookup = function () {
+ this.foundFeatures = false;
+};
+
LdapFilter.prototype.findFeatures = function() {
- //TODO: reset this.foundFeatures when any base DN changes
if(!this.foundFeatures && !this.locked && this.mode === LdapWizard.filterModeAssisted) {
this.foundFeatures = true;
var objcEl, avgrEl;
loginFilter: false,
groupFilter: false,
ajaxRequests: {},
+ lastTestSuccessful: true,
ajax: function(param, fnOnSuccess, fnOnError, reqID) {
if(!_.isUndefined(reqID)) {
LdapWizard.detectorsRunInXPMode = 0;
LdapWizard.instantiateFilters();
LdapWizard.admin.setExperienced($('#ldap_experienced_admin').is(':checked'));
+ LdapWizard.lastTestSuccessful = true;
LdapWizard.basicStatusCheck();
LdapWizard.functionalityCheck();
LdapWizard.isConfigurationActiveControlLocked = false;
}
},
- processChanges: function(triggerObj) {
+ /**
+ * allows UserFilter, LoginFilter and GroupFilter to lookup objectClasses
+ * and similar again. This should be called after essential changes, e.g.
+ * Host or BaseDN changes, or positive functionality check
+ *
+ */
+ allowFilterFeatureSearch: function () {
+ LdapWizard.userFilter.reAllowFeatureLookup();
+ LdapWizard.loginFilter.reAllowFeatureLookup();
+ LdapWizard.groupFilter.reAllowFeatureLookup();
+ },
+
+ processChanges: function (triggerObj) {
LdapWizard.hideInfoBox();
if(triggerObj.id === 'ldap_host'
if($('#ldap_port').val()) {
//if Port is already set, check BaseDN
LdapWizard.checkBaseDN();
+ LdapWizard.allowFilterFeatureSearch();
}
}
$('.ldap_config_state_indicator').addClass('ldap_grey');
$('.ldap_config_state_indicator_sign').removeClass('error');
$('.ldap_config_state_indicator_sign').addClass('success');
+ if(!LdapWizard.lastTestSuccessful) {
+ LdapWizard.lastTestSuccessful = true;
+ LdapWizard.allowFilterFeatureSearch();
+ }
},
//onError
function(result) {
$('.ldap_config_state_indicator').removeClass('ldap_grey');
$('.ldap_config_state_indicator_sign').addClass('error');
$('.ldap_config_state_indicator_sign').removeClass('success');
+ LdapWizard.lastTestSuccessful = false;
}
);
} else {