some authorization fix

This commit is contained in:
Harry Bomrah 2014-12-01 21:16:52 +08:00
parent 73d7e378aa
commit 545312c966
1 changed files with 1 additions and 1 deletions

View File

@ -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?