Commit 8f09db6ac1ffd8a4c17e7da977f9190832e13309
Committed by
Antonio Terceiro
1 parent
5a94fec6
Exists in
master
and in
29 other branches
Event type is always available
Showing
2 changed files
with
2 additions
and
13 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
| ... | ... | @@ -40,9 +40,9 @@ class CmsController < MyProfileController |
| 40 | 40 | def available_article_types |
| 41 | 41 | articles = [ |
| 42 | 42 | TinyMceArticle, |
| 43 | - TextileArticle | |
| 43 | + TextileArticle, | |
| 44 | + Event | |
| 44 | 45 | ] |
| 45 | - articles << Event unless profile.environment.enabled?(:disable_asset_events) | |
| 46 | 46 | parent_id = params ? params[:parent_id] : nil |
| 47 | 47 | if !parent_id or !Article.find(parent_id).blog? |
| 48 | 48 | articles += [ | ... | ... |
test/functional/cms_controller_test.rb
| ... | ... | @@ -1155,17 +1155,6 @@ class CmsControllerTest < Test::Unit::TestCase |
| 1155 | 1155 | assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{profile.identifier}/cms/upload_files?parent_id=#{profile.blog.id}"} |
| 1156 | 1156 | end |
| 1157 | 1157 | |
| 1158 | - should 'not offer to create events if events is disabled' do | |
| 1159 | - e = profile.environment | |
| 1160 | - e.enable(:disable_asset_events) | |
| 1161 | - e.save! | |
| 1162 | - | |
| 1163 | - get :new, :profile => profile.identifier | |
| 1164 | - | |
| 1165 | - | |
| 1166 | - assert_not_includes assigns(:article_types).map{|at|at[:name]}, 'Event' | |
| 1167 | - end | |
| 1168 | - | |
| 1169 | 1158 | should 'not allow user without permission create an article in community' do |
| 1170 | 1159 | c = Community.create!(:name => 'test_comm', :identifier => 'test_comm') |
| 1171 | 1160 | u = create_user_with_permission('test_user', 'bogus_permission', c) | ... | ... |