mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Can clear flags on deleted posts if you're a moderator
This commit is contained in:
@@ -109,6 +109,12 @@ class Guardian
|
||||
true
|
||||
end
|
||||
|
||||
def can_clear_flags?(post)
|
||||
return false if @user.blank?
|
||||
return false if post.blank?
|
||||
@user.has_trust_level?(:moderator)
|
||||
end
|
||||
|
||||
def can_revoke_admin?(admin)
|
||||
return false unless @user.try(:admin?)
|
||||
return false if admin.blank?
|
||||
|
||||
Reference in New Issue
Block a user