trabajo-afectivo/app/policies/ticket/shared_draft_zoom_policy.rb
2022-02-24 12:33:52 +01:00

21 lines
361 B
Ruby

# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class Ticket::SharedDraftZoomPolicy < ApplicationPolicy
def update?
access?(__method__)
end
def show?
access?(__method__)
end
def destroy?
access?(__method__)
end
private
def access?(_method)
TicketPolicy.new(user, record.ticket).update?
end
end