FIX: only staff can banner topics

This commit is contained in:
Arpit Jalan
2019-04-02 12:38:15 +05:30
parent d85240335b
commit d68d29f37a
4 changed files with 40 additions and 34 deletions

View File

@ -154,4 +154,8 @@ module TopicGuardian
def can_update_bumped_at?
is_staff? || @user.has_trust_level?(TrustLevel[4])
end
def can_banner_topic?(topic)
authenticated? && !topic.private_message? && is_staff?
end
end