mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
BUGFIX: Editing a category would break categories for the current user
session.
This commit is contained in:
@ -41,6 +41,9 @@ class CategoriesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
if Category.topic_create_allowed(guardian).where(id: @category.id).exists?
|
||||||
|
@category.permission = CategoryGroup.permission_types[:full]
|
||||||
|
end
|
||||||
render_serialized(@category, CategorySerializer)
|
render_serialized(@category, CategorySerializer)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user