diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index 206486e..b2d7ab7 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -40,9 +40,9 @@ class CmsController < MyProfileController def available_article_types articles = [ TinyMceArticle, - TextileArticle + TextileArticle, + Event ] - articles << Event unless profile.environment.enabled?(:disable_asset_events) parent_id = params ? params[:parent_id] : nil if !parent_id or !Article.find(parent_id).blog? articles += [ diff --git a/test/functional/cms_controller_test.rb b/test/functional/cms_controller_test.rb index 9a84215..5d3fd28 100644 --- a/test/functional/cms_controller_test.rb +++ b/test/functional/cms_controller_test.rb @@ -1155,17 +1155,6 @@ class CmsControllerTest < Test::Unit::TestCase assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/#{profile.identifier}/cms/upload_files?parent_id=#{profile.blog.id}"} end - should 'not offer to create events if events is disabled' do - e = profile.environment - e.enable(:disable_asset_events) - e.save! - - get :new, :profile => profile.identifier - - - assert_not_includes assigns(:article_types).map{|at|at[:name]}, 'Event' - end - should 'not allow user without permission create an article in community' do c = Community.create!(:name => 'test_comm', :identifier => 'test_comm') u = create_user_with_permission('test_user', 'bogus_permission', c) -- libgit2 0.21.2