Fixed issue #1891: Missing identifier attribute on LDAP entry causes Sync to fail.
This commit is contained in:
parent
43c38dcd97
commit
8d4b4a0152
7 changed files with 18 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue