Commit 2ce7476f661d46f7b03c4b52531a49ca313468e9

Authored by AntonioTerceiro
1 parent 81a0f403

ActionItem114: making CMS working again



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@887 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/profile_admin/cms_controller.rb
1 1 class CmsController < ProfileAdminController
2   - include PermissionCheck
3   - include AuthenticatedSystem
4 2  
5 3 define_option :page_class, Article
6 4  
... ... @@ -16,17 +14,14 @@ class CmsController &lt; ProfileAdminController
16 14 current_user.person
17 15 end
18 16  
  17 + public
  18 +
19 19 #############################################################
20 20 # everything below was copied from comatose
21 21 #############################################################
22 22  
23 23 define_option :original_template_root, nil
24 24 define_option :plugin_layout_path, File.join( '..', '..', '..', 'vendor', 'plugins', 'comatose', 'views', 'layouts' )
25   -
26   - # which class should the controller use when manipulating pages?
27   - # this option is useful to applications that want to inherit page_class
28   - # into their own models.
29   - define_option :page_class, Comatose::Page
30 25  
31 26 before_filter :handle_authorization
32 27 before_filter :set_content_type
... ... @@ -163,7 +158,7 @@ class CmsController &lt; ProfileAdminController
163 158 end
164 159  
165 160  
166   - otected
  161 + protected
167 162  
168 163 def handle_authorization
169 164 if Comatose.config.admin_authorization.is_a? Proc
... ...
config/environment.rb
... ... @@ -83,12 +83,6 @@ Comatose.configure do |config|
83 83 Profile.exists?(:identifier => request.parameters[:profile])
84 84 # FIXME: also check permissions
85 85 end
86   - config.admin_includes << AuthenticatedSystem
87   - config.admin_includes << NeedsProfile
88   -
89   - config.admin_helpers << ApplicationHelper
90   - config.admin_helpers << DocumentHelper
91   - config.admin_helpers << LanguageHelper
92 86  
93 87 config.default_filter = '[No Filter]'
94 88 end
... ...