mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 08:16:05 +01:00
15 lines
237 B
Ruby
15 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
|