we can't see a nil category

This commit is contained in:
Régis Hanol 2016-07-02 12:21:14 +02:00
parent 9bf34ce49b
commit b65f2fc565
1 changed files with 1 additions and 0 deletions

View File

@ -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