static.rb 720 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Ldap::User::Attributes::Static < Sequencer::Unit::Base
  3. include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped
  4. prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
  5. skip_any_action
  6. uses :ldap_config
  7. def process
  8. provide_mapped do
  9. {
  10. # we have to add the active state manually
  11. # because otherwise disabled instances won't get
  12. # re-activated if they should get synced again
  13. active: true,
  14. # Set the source to 'Ldap' for the authentication handling.
  15. source: "Ldap::#{ldap_config[:id]}",
  16. }
  17. end
  18. end
  19. end