Merge branch 'develop' of git.znuny.com:zammad/zammad into develop
This commit is contained in:
commit
26800ad02f
3 changed files with 28 additions and 1 deletions
|
@ -112,7 +112,7 @@ class Ldap
|
||||||
#
|
#
|
||||||
# @return [String, nil] The active or found filter or nil if none could be found.
|
# @return [String, nil] The active or found filter or nil if none could be found.
|
||||||
def filter
|
def filter
|
||||||
@filter ||= lookup_filter(['(objectClass=group)', '(objectClass=posixgroup)', '(objectClass=organization)'])
|
@filter ||= lookup_filter(['(objectClass=groupOfUniqueNames)', '(objectClass=group)', '(objectClass=posixgroup)', '(objectClass=organization)'])
|
||||||
end
|
end
|
||||||
|
|
||||||
# The active uid attribute of the instance. If none give on initialization an automatic lookup is performed.
|
# The active uid attribute of the instance. If none give on initialization an automatic lookup is performed.
|
||||||
|
|
27
spec/lib/sequencer/unit/import/ldap/user/mapping_spec.rb
Normal file
27
spec/lib/sequencer/unit/import/ldap/user/mapping_spec.rb
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe Sequencer::Unit::Import::Ldap::User::Mapping, sequencer: :unit do
|
||||||
|
|
||||||
|
it 'ensures to unset attribute value if none is provided' do
|
||||||
|
|
||||||
|
ldap_config = {
|
||||||
|
user_attributes: {
|
||||||
|
firstName: 'firstname',
|
||||||
|
lastName: 'lastname',
|
||||||
|
samaccountname: 'login',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource = {
|
||||||
|
samaccountname: 'Some41',
|
||||||
|
firstName: 'Some',
|
||||||
|
}
|
||||||
|
|
||||||
|
provided = process(
|
||||||
|
ldap_config: ldap_config,
|
||||||
|
resource: resource,
|
||||||
|
)
|
||||||
|
|
||||||
|
expect(provided['lastname']).to be_nil
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue