Fix: Accessing threads in deleted forum, will deny access

This commit is contained in:
jomo
2014-06-26 22:38:16 +02:00
parent b03adf66d8
commit fdfb491af9
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ class Forumthread < ActiveRecord::Base
end
def can_read?(user)
forum.can_read?(user)
forum && forum.can_read?(user)
end
def can_write?(user)