mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 08:22:46 +08:00
we can't see a nil category
This commit is contained in:
parent
9bf34ce49b
commit
b65f2fc565
|
@ -45,6 +45,7 @@ module CategoryGuardian
|
|||
end
|
||||
|
||||
def can_see_category?(category)
|
||||
return false unless category
|
||||
return true if is_admin?
|
||||
return true if !category.read_restricted
|
||||
return true if is_staged? && category.email_in.present? && category.email_in_allow_strangers
|
||||
|
|
Loading…
Reference in New Issue
Block a user