Fixed issue #1114 - Configuration of LDAP with disabled anonymous bind fails.
This commit is contained in:
parent
118ed9d58b
commit
017022eae9
2 changed files with 21 additions and 11 deletions
|
@ -287,12 +287,13 @@ class ConnectionWizard extends App.WizardModal
|
||||||
|
|
||||||
option = ''
|
option = ''
|
||||||
options = {}
|
options = {}
|
||||||
for dn in data.attributes.namingcontexts
|
if !_.isEmpty data.attributes
|
||||||
options[dn] = dn
|
for dn in data.attributes.namingcontexts
|
||||||
if option is ''
|
options[dn] = dn
|
||||||
option = dn
|
if option is ''
|
||||||
if option.length > dn.length
|
option = dn
|
||||||
option = dn
|
if option.length > dn.length
|
||||||
|
option = dn
|
||||||
|
|
||||||
@wizardConfig.options = options
|
@wizardConfig.options = options
|
||||||
@wizardConfig.option = option
|
@wizardConfig.option = option
|
||||||
|
|
|
@ -14,12 +14,21 @@ class Integration::LdapController < ApplicationController
|
||||||
attributes: ldap.preferences,
|
attributes: ldap.preferences,
|
||||||
}
|
}
|
||||||
rescue => e
|
rescue => e
|
||||||
logger.error e
|
# workaround for issue #1114
|
||||||
|
if e.message.end_with?(', 48, Inappropriate Authentication')
|
||||||
|
result = {
|
||||||
|
result: 'ok',
|
||||||
|
attributes: {},
|
||||||
|
}
|
||||||
|
else
|
||||||
|
logger.error e
|
||||||
|
result = {
|
||||||
|
result: 'failed',
|
||||||
|
message: e.message,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
render json: {
|
render json: result
|
||||||
result: 'failed',
|
|
||||||
message: e.message,
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def bind
|
def bind
|
||||||
|
|
Loading…
Reference in a new issue