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