Fixes #3373 - LDAP users marked as inactive.
This commit is contained in:
parent
6c3d8b8b36
commit
c6fb3370e2
2 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -23,6 +23,7 @@ RSpec.describe ::Sequencer::Sequence::Import::Ldap::Users, sequencer: :sequence
|
|||
group_entry.dn => [1, 2]
|
||||
},
|
||||
user_attributes: {
|
||||
'samaccountname' => 'login',
|
||||
'first_name' => 'firstname',
|
||||
},
|
||||
user_uid: 'objectguid',
|
||||
|
@ -107,6 +108,7 @@ RSpec.describe ::Sequencer::Sequence::Import::Ldap::Users, sequencer: :sequence
|
|||
group_entry.dn => agent_admin_role_ids
|
||||
},
|
||||
user_attributes: {
|
||||
'samaccountname' => 'login',
|
||||
'first_name' => 'firstname',
|
||||
},
|
||||
user_uid: 'objectguid',
|
||||
|
|
Loading…
Reference in a new issue