From 2b0151afe99881b1c2a445db6d4939ec2fc6fcec Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Wed, 5 Mar 2014 17:21:55 -0500 Subject: [PATCH] BUGFIX: Editing a category would break categories for the current user session. --- app/controllers/categories_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 32284c03c20..92b9d068173 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -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