From 545312c9663f12b47ca24cbf316c27861fa6e144 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 1 Dec 2014 21:16:52 +0800 Subject: [PATCH] some authorization fix --- app/controllers/admin/page_contents_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/page_contents_controller.rb b/app/controllers/admin/page_contents_controller.rb index a85901c..8037908 100644 --- a/app/controllers/admin/page_contents_controller.rb +++ b/app/controllers/admin/page_contents_controller.rb @@ -4,7 +4,7 @@ class Admin::PageContentsController < OrbitAdminController @table_fields = [:page_id, :name,:version,:update_at,:last_modified, :category] @filter_fields = {} @pages = Page.where(:module=>"page_content").order_by(sort) - @categories = @module_app.categories.collect{|c| [c.title, c.id]} + @categories = @module_app.module_app.categories.enabled.authorized(current_user).collect{|c| [c.title, c.id]} @pages = search_data(@pages,[:name, :page_id]).page(params[:page]).per(10) render :partial => "index" if request.xhr?