From eb4178406f1c00d43543884c734efe486fe66c7b 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 4f80ae2..8f51c95 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 6a81a40..ab7ff84 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -1210,4 +1210,10 @@ class ProfileEditorControllerTest < ActionController::TestCase get :header_footer, :profile => user.identifier assert_response :success 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