shared_draft_zoom_policy.rb 361 B

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Ticket::SharedDraftZoomPolicy < ApplicationPolicy
  3. def update?
  4. access?(__method__)
  5. end
  6. def show?
  7. access?(__method__)
  8. end
  9. def destroy?
  10. access?(__method__)
  11. end
  12. private
  13. def access?(_method)
  14. TicketPolicy.new(user, record.ticket).update?
  15. end
  16. end