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