module PayoutEntities
  class PayoutEntityPolicy < ApplicationPolicy
    def index?
      allowed?
    end

    def show?
      allowed?
    end

    def edit?
      allowed?
    end

    def update?
      allowed?
    end

    def new?
      allowed?
    end

    def create?
      allowed?
    end

    def destroy?
      allowed?
    end

    def remove?
      allowed?
    end

    def migrate_legacy_partner_workflow?
      allowed?
    end

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