mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
parent
92a9ae6ab0
commit
2683b7793b
|
@ -316,8 +316,7 @@ class Guardian
|
|||
return true if user.badges
|
||||
.where(allow_title: true)
|
||||
.pluck(:name)
|
||||
.map { |name| Badge.display_name(name) }
|
||||
.include?(title)
|
||||
.any? { |name| Badge.display_name(name) == title }
|
||||
|
||||
user.groups.where(title: title).exists?
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user