2017-11-29 16:54:52 +00:00
|
|
|
class Sequencer
|
|
|
|
class Unit
|
|
|
|
module Import
|
|
|
|
module Ldap
|
|
|
|
module User
|
|
|
|
class Mapping < Sequencer::Unit::Import::Common::Mapping::FlatKeys
|
|
|
|
uses :ldap_config
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def mapping
|
|
|
|
ldap_config[:user_attributes].dup.tap do |config|
|
2018-01-12 11:53:43 +00:00
|
|
|
# fallback to samaccountname as login
|
2017-11-29 16:54:52 +00:00
|
|
|
# if no login is given via mapping
|
|
|
|
if !config.values.include?('login')
|
2018-01-12 11:53:43 +00:00
|
|
|
config['samaccountname'] = 'login'
|
2017-11-29 16:54:52 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|