BUGFIX: Editing a category would break categories for the current user
session.
This commit is contained in:
parent
ca12ea42a7
commit
2b0151afe9
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue