module Subscriptions
  class TicketProductPolicy < ApplicationPolicy
    def index?
      allowed?
    end

    def new?
      allowed?
    end

    def create?
      allowed?
    end

    def show?
      allowed?
    end

    def edit?
      allowed?
    end

    def update?
      allowed?
    end

    def deactivate?
      allowed?
    end

    def reactivate?
      allowed?
    end

    def grant_admin_sub?
      allowed?
    end

    def mass_dnr?
      allowed?
    end

    def edit_emoticon_prefix?
      allowed?
    end

    def create_additional_tiers?
      allowed?
    end

    def allowed?
      user.permitted? BeefCake::Permission.for(:ticket_products)
    end

    def sync_external_ticket_product?
      allowed?
    end
  end
end
