Commit e035ee75310410abca3db9fd51fecf2de03954da

Authored by MoisesMachado
1 parent d4a24e85

ActionItem85: applied the permission check to the cms controller

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@765 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/profile_admin/cms_controller.rb
1 class CmsController < ComatoseAdminController 1 class CmsController < ComatoseAdminController
2 extend PermissionCheck 2 extend PermissionCheck
3 - 3 +
4 ApplicationController.needs_profile 4 ApplicationController.needs_profile
5 5
6 define_option :page_class, Article 6 define_option :page_class, Article
7 7
8 -# protect [:edit, :new, :reorder, :delete], :post_content, :profile 8 + protect [:edit, :new, :reorder, :delete], 'post_content', :profile
  9 +
  10 + protected
  11 +
  12 + def profile
  13 + Profile.find_by_identifier(params[:profile])
  14 + end
9 end 15 end