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 module Mapping
class FlatKeys < Sequencer::Unit::Base class FlatKeys < Sequencer::Unit::Base
include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_any_action
uses :resource uses :resource
provides :mapped
def process def process
provide_mapped do provide_mapped do

View file

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

View file

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

View file

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

View file

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

View file

@ -5,11 +5,18 @@ class Sequencer
module User module User
module RemoteId module RemoteId
class Unhex < Sequencer::Unit::Base class Unhex < Sequencer::Unit::Base
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
skip_action :skipped, :failed
uses :remote_id uses :remote_id
provides :remote_id provides :remote_id
def process 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? return if remote_id.ascii_only?
state.provide(:remote_id, unhexed) state.provide(:remote_id, unhexed)
end end

View file

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