Fixed issue #1891: Missing identifier attribute on LDAP entry causes Sync to fail.

This commit is contained in:
Thorsten Eckel 2018-04-26 09:07:30 +02:00
parent 43c38dcd97
commit 8d4b4a0152
7 changed files with 18 additions and 3 deletions

View file

@ -5,8 +5,12 @@ class Sequencer
module Mapping
class FlatKeys < Sequencer::Unit::Base
include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_any_action
uses :resource
provides :mapped
def process
provide_mapped do

View file

@ -5,6 +5,9 @@ class Sequencer
module Model
module Associations
class Extract < Sequencer::Unit::Base
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_any_action
uses :model_class, :mapped
provides :associations

View file

@ -8,7 +8,7 @@ class Sequencer
include ::Sequencer::Unit::Import::Common::Model::Mixin::HandleFailure
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_action :skipped
skip_action :skipped, :failed
uses :mapped, :model_class
provides :instance

View file

@ -7,7 +7,7 @@ class Sequencer
class Downcase < Sequencer::Unit::Base
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_action :skipped
skip_action :skipped, :failed
uses :mapped

View file

@ -7,7 +7,7 @@ class Sequencer
class CheckValidity < Sequencer::Unit::Base
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_action :skipped
skip_action :skipped, :failed
uses :mapped

View file

@ -5,11 +5,18 @@ class Sequencer
module User
module RemoteId
class Unhex < Sequencer::Unit::Base
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_action :skipped, :failed
uses :remote_id
provides :remote_id
def process
# check if a remote_id is given and
# prefer .nil? over .blank? etc. because
# the HEX values cause errors otherwise
return if remote_id.nil?
return if remote_id.ascii_only?
state.provide(:remote_id, unhexed)
end

View file

@ -21,6 +21,7 @@ class Sequencer
def add_role_ids(statistics)
return statistics if instance.blank?
return statistics if associations.blank?
# add the parent role_ids hash
# so we can fill it