From a7b4f2a9f8ba58709f80e5ed0a13df6197085140 Mon Sep 17 00:00:00 2001 From: Daniela Feitosa Date: Mon, 5 Oct 2015 21:28:14 -0300 Subject: [PATCH] Remove "Manage Roles" option for person --- app/views/profile_editor/index.html.erb | 2 +- test/functional/profile_editor_controller_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/profile_editor/index.html.erb b/app/views/profile_editor/index.html.erb index 7d3db97..3a79591 100644 --- a/app/views/profile_editor/index.html.erb +++ b/app/views/profile_editor/index.html.erb @@ -28,7 +28,7 @@ <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') %> - <%= control_panel_button(_('Manage Roles'), 'roles', :controller => 'profile_roles') %> + <%= control_panel_button(_('Manage Roles'), 'roles', :controller => 'profile_roles') if profile.organization? %> <% unless profile.enterprise? %> <%= case profile.blogs.count diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index fde38e3..69d78fb 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -1152,4 +1152,10 @@ class ProfileEditorControllerTest < ActionController::TestCase get :index, :profile => user.identifier assert_tag :tag => 'div', :descendant => { :tag => 'a', :content => 'Edit Header and Footer' } end + + should 'not display button to manage roles on control panel of person' do + get :index, :profile => profile.identifier + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/default_user/profile_roles" } + end + end -- libgit2 0.21.2