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
|
provides :action
|
||||||
|
|
||||||
def process
|
def process
|
||||||
return if !skip?
|
return if !mandatory_missing?
|
||||||
|
|
||||||
logger.info { skip_log_message }
|
logger.info { skip_log_message }
|
||||||
state.provide(:action, :skipped)
|
state.provide(:action, :skipped)
|
||||||
|
@ -30,10 +30,10 @@ class Sequencer
|
||||||
raise "Missing implementation of '#{__method__}' method for '#{self.class.name}'"
|
raise "Missing implementation of '#{__method__}' method for '#{self.class.name}'"
|
||||||
end
|
end
|
||||||
|
|
||||||
def skip?
|
def mandatory_missing?
|
||||||
return true if attribute_value.blank?
|
return true if attribute_value.blank?
|
||||||
|
|
||||||
missing_for_keys.blank?
|
missing_for_keys.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
def skip_log_message
|
def skip_log_message
|
||||||
|
|
|
@ -23,7 +23,8 @@ RSpec.describe ::Sequencer::Sequence::Import::Ldap::Users, sequencer: :sequence
|
||||||
group_entry.dn => [1, 2]
|
group_entry.dn => [1, 2]
|
||||||
},
|
},
|
||||||
user_attributes: {
|
user_attributes: {
|
||||||
'first_name' => 'firstname',
|
'samaccountname' => 'login',
|
||||||
|
'first_name' => 'firstname',
|
||||||
},
|
},
|
||||||
user_uid: 'objectguid',
|
user_uid: 'objectguid',
|
||||||
unassigned_users: 'skip_sync',
|
unassigned_users: 'skip_sync',
|
||||||
|
@ -107,7 +108,8 @@ RSpec.describe ::Sequencer::Sequence::Import::Ldap::Users, sequencer: :sequence
|
||||||
group_entry.dn => agent_admin_role_ids
|
group_entry.dn => agent_admin_role_ids
|
||||||
},
|
},
|
||||||
user_attributes: {
|
user_attributes: {
|
||||||
'first_name' => 'firstname',
|
'samaccountname' => 'login',
|
||||||
|
'first_name' => 'firstname',
|
||||||
},
|
},
|
||||||
user_uid: 'objectguid',
|
user_uid: 'objectguid',
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue