pgp_key_policy.rb 292 B

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class PGPKeyPolicy < ApplicationPolicy
  3. def create?
  4. admin?
  5. end
  6. def show?
  7. admin?
  8. end
  9. def destroy?
  10. admin?
  11. end
  12. private
  13. def admin?
  14. user.permissions?('admin.integration.pgp')
  15. end
  16. end