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 class CmsController < ProfileAdminController 1 class CmsController < ProfileAdminController
2 - include PermissionCheck  
3 - include AuthenticatedSystem  
4 2
5 define_option :page_class, Article 3 define_option :page_class, Article
6 4
@@ -16,17 +14,14 @@ class CmsController &lt; ProfileAdminController @@ -16,17 +14,14 @@ class CmsController &lt; ProfileAdminController
16 current_user.person 14 current_user.person
17 end 15 end
18 16
  17 + public
  18 +
19 ############################################################# 19 #############################################################
20 # everything below was copied from comatose 20 # everything below was copied from comatose
21 ############################################################# 21 #############################################################
22 22
23 define_option :original_template_root, nil 23 define_option :original_template_root, nil
24 define_option :plugin_layout_path, File.join( '..', '..', '..', 'vendor', 'plugins', 'comatose', 'views', 'layouts' ) 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 before_filter :handle_authorization 26 before_filter :handle_authorization
32 before_filter :set_content_type 27 before_filter :set_content_type
@@ -163,7 +158,7 @@ class CmsController &lt; ProfileAdminController @@ -163,7 +158,7 @@ class CmsController &lt; ProfileAdminController
163 end 158 end
164 159
165 160
166 - otected 161 + protected
167 162
168 def handle_authorization 163 def handle_authorization
169 if Comatose.config.admin_authorization.is_a? Proc 164 if Comatose.config.admin_authorization.is_a? Proc
config/environment.rb
@@ -83,12 +83,6 @@ Comatose.configure do |config| @@ -83,12 +83,6 @@ Comatose.configure do |config|
83 Profile.exists?(:identifier => request.parameters[:profile]) 83 Profile.exists?(:identifier => request.parameters[:profile])
84 # FIXME: also check permissions 84 # FIXME: also check permissions
85 end 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 config.default_filter = '[No Filter]' 87 config.default_filter = '[No Filter]'
94 end 88 end