mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #1673 from aperrault/patch-04
Fixing neglect to determine whether a user has the permission to create ...
This commit is contained in:
@@ -18,7 +18,11 @@ class TopicListSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
def can_create_topic
|
||||
scope.can_create?(Topic)
|
||||
if object.category.present?
|
||||
scope.can_create?(Topic, object.category)
|
||||
else
|
||||
scope.can_create?(Topic)
|
||||
end
|
||||
end
|
||||
|
||||
def include_more_topics_url?
|
||||
|
||||
Reference in New Issue
Block a user