*actually* fix parens checking if forum exists
this led to 500 when the forum was deleted but the thread still existed
This commit is contained in:
@@ -38,7 +38,7 @@ class Forumthread < ActiveRecord::Base
|
|||||||
def can_read?(user)
|
def can_read?(user)
|
||||||
# we might have threads without a forum
|
# we might have threads without a forum
|
||||||
# e.g. forum deleted
|
# e.g. forum deleted
|
||||||
forum && (forum.can_read?(user) || (forum.can_write?(user)) && self.sticky?) || author == user
|
forum && (forum.can_read?(user) || (forum.can_write?(user) && self.sticky?) || author == user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def can_write?(user)
|
def can_write?(user)
|
||||||
|
|||||||
Reference in New Issue
Block a user