mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +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
|
||||
|
||||
def show
|
||||
if Category.topic_create_allowed(guardian).where(id: @category.id).exists?
|
||||
@category.permission = CategoryGroup.permission_types[:full]
|
||||
end
|
||||
render_serialized(@category, CategorySerializer)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user