Retrospring/app/policies/mute_rule_policy.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
237 B
Ruby
Raw Normal View History

2022-11-18 13:51:05 -08:00
# frozen_string_literal: true
class MuteRulePolicy
attr_reader :user, :mute_rule
def initialize(user, mute_rule)
@user = user
@mute_rule = mute_rule
end
def destroy?
user == mute_rule.user || user.admin?
end
end