From e035ee75310410abca3db9fd51fecf2de03954da Mon Sep 17 00:00:00 2001 From: MoisesMachado Date: Sat, 20 Oct 2007 02:31:15 +0000 Subject: [PATCH] ActionItem85: applied the permission check to the cms controller --- app/controllers/profile_admin/cms_controller.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/profile_admin/cms_controller.rb b/app/controllers/profile_admin/cms_controller.rb index 01ed23e..fe349a2 100644 --- a/app/controllers/profile_admin/cms_controller.rb +++ b/app/controllers/profile_admin/cms_controller.rb @@ -1,9 +1,15 @@ class CmsController < ComatoseAdminController extend PermissionCheck - + ApplicationController.needs_profile define_option :page_class, Article -# protect [:edit, :new, :reorder, :delete], :post_content, :profile + protect [:edit, :new, :reorder, :delete], 'post_content', :profile + + protected + + def profile + Profile.find_by_identifier(params[:profile]) + end end -- libgit2 0.21.2