Fixes #3373 - LDAP users marked as inactive.

This commit is contained in:
Thorsten Eckel 2021-01-18 16:30:49 +01:00
parent 6c3d8b8b36
commit c6fb3370e2
2 changed files with 7 additions and 5 deletions

View file

@ -18,7 +18,7 @@ class Sequencer
provides :action
def process
return if !skip?
return if !mandatory_missing?
logger.info { skip_log_message }
state.provide(:action, :skipped)
@ -30,10 +30,10 @@ class Sequencer
raise "Missing implementation of '#{__method__}' method for '#{self.class.name}'"
end
def skip?
def mandatory_missing?
return true if attribute_value.blank?
missing_for_keys.blank?
missing_for_keys.present?
end
def skip_log_message

View file

@ -23,7 +23,8 @@ RSpec.describe ::Sequencer::Sequence::Import::Ldap::Users, sequencer: :sequence
group_entry.dn => [1, 2]
},
user_attributes: {
'first_name' => 'firstname',
'samaccountname' => 'login',
'first_name' => 'firstname',
},
user_uid: 'objectguid',
unassigned_users: 'skip_sync',
@ -107,7 +108,8 @@ RSpec.describe ::Sequencer::Sequence::Import::Ldap::Users, sequencer: :sequence
group_entry.dn => agent_admin_role_ids
},
user_attributes: {
'first_name' => 'firstname',
'samaccountname' => 'login',
'first_name' => 'firstname',
},
user_uid: 'objectguid',
}