mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:09:52 +01:00
14 lines
237 B
Ruby
14 lines
237 B
Ruby
# 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
|