handler_notification_options.rb 787 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class SecureMailing::Backend::HandlerNotificationOptions < SecureMailing::Backend::Handler
  3. attr_reader :from, :recipients, :perform, :security_options
  4. def initialize(from:, recipients:, perform:)
  5. super()
  6. @from = from
  7. @recipients = recipients
  8. @perform = perform
  9. @security_options = {
  10. type: type,
  11. sign: {
  12. success: false,
  13. },
  14. encryption: {
  15. success: false,
  16. },
  17. }
  18. end
  19. def process
  20. check_sign if perform[:sign]
  21. check_encrypt if perform[:encrypt]
  22. security_options
  23. end
  24. def check_sign(from)
  25. raise NotImplementedError
  26. end
  27. def check_encrypt(recipients)
  28. raise NotImplementedError
  29. end
  30. end