summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/js')
-rw-r--r--apps/user_ldap/js/wizard/wizardTabElementary.js9
-rw-r--r--apps/user_ldap/js/wizard/wizardTabGeneric.js5
-rw-r--r--apps/user_ldap/js/wizard/wizardTabUserFilter.js6
3 files changed, 19 insertions, 1 deletions
diff --git a/apps/user_ldap/js/wizard/wizardTabElementary.js b/apps/user_ldap/js/wizard/wizardTabElementary.js
index b8ab367dfd1..75664275a9c 100644
--- a/apps/user_ldap/js/wizard/wizardTabElementary.js
+++ b/apps/user_ldap/js/wizard/wizardTabElementary.js
@@ -165,6 +165,12 @@ OCA = OCA || {};
* @inheritdoc
*/
overrideErrorMessage: function(message, key) {
+ var original = message;
+ message = this._super(message, key);
+ if(original !== message) {
+ // we pass the parents change
+ return message;
+ }
switch(key) {
case 'ldap_port':
if (message === 'Invalid credentials') {
@@ -267,7 +273,8 @@ OCA = OCA || {};
message = t('user_ldap', objectsFound + ' entries available within the provided Base DN');
}
} else {
- message = t('user_ldap', 'An error occurred. Please check the Base DN, as well as connection settings and credentials.');
+ message = view.overrideErrorMessage(payload.data.message);
+ message = message || t('user_ldap', 'An error occurred. Please check the Base DN, as well as connection settings and credentials.');
if(payload.data.message) {
console.warn(payload.data.message);
}
diff --git a/apps/user_ldap/js/wizard/wizardTabGeneric.js b/apps/user_ldap/js/wizard/wizardTabGeneric.js
index 720628fa609..c272df7e3cc 100644
--- a/apps/user_ldap/js/wizard/wizardTabGeneric.js
+++ b/apps/user_ldap/js/wizard/wizardTabGeneric.js
@@ -70,6 +70,11 @@ OCA = OCA || {};
* @returns {string}
*/
overrideErrorMessage: function(message, key) {
+ if(message === 'LDAP authentication method rejected'
+ && !this.configModel.configuration.ldap_dn)
+ {
+ message = t('user_ldap', 'Anonymous bind is not allowed. Please provide a User DN and Password.');
+ }
return message;
},
diff --git a/apps/user_ldap/js/wizard/wizardTabUserFilter.js b/apps/user_ldap/js/wizard/wizardTabUserFilter.js
index 992c1ccf379..4fe223ee075 100644
--- a/apps/user_ldap/js/wizard/wizardTabUserFilter.js
+++ b/apps/user_ldap/js/wizard/wizardTabUserFilter.js
@@ -122,6 +122,12 @@ OCA = OCA || {};
* @inheritdoc
*/
overrideErrorMessage: function(message, key) {
+ var original = message;
+ message = this._super(message, key);
+ if(original !== message) {
+ // we pass the parents change
+ return message;
+ }
if( key === 'ldap_userfilter_groups'
&& message === 'memberOf is not supported by the server'
) {