Commit a7b4f2a9f8ba58709f80e5ed0a13df6197085140
Committed by
Antonio Terceiro
1 parent
230bd714
Exists in
stable-1.2
Remove "Manage Roles" option for person
Only organizations can manage roles (cherry picked from commit eb4178406f1c00d43543884c734efe486fe66c7b)
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/views/profile_editor/index.html.erb
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | |
29 | 29 | <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') %> |
30 | 30 | |
31 | - <%= control_panel_button(_('Manage Roles'), 'roles', :controller => 'profile_roles') %> | |
31 | + <%= control_panel_button(_('Manage Roles'), 'roles', :controller => 'profile_roles') if profile.organization? %> | |
32 | 32 | |
33 | 33 | <% unless profile.enterprise? %> |
34 | 34 | <%= case profile.blogs.count | ... | ... |
test/functional/profile_editor_controller_test.rb
... | ... | @@ -1152,4 +1152,10 @@ class ProfileEditorControllerTest < ActionController::TestCase |
1152 | 1152 | get :index, :profile => user.identifier |
1153 | 1153 | assert_tag :tag => 'div', :descendant => { :tag => 'a', :content => 'Edit Header and Footer' } |
1154 | 1154 | end |
1155 | + | |
1156 | + should 'not display button to manage roles on control panel of person' do | |
1157 | + get :index, :profile => profile.identifier | |
1158 | + assert_no_tag :tag => 'a', :attributes => { :href => "/myprofile/default_user/profile_roles" } | |
1159 | + end | |
1160 | + | |
1155 | 1161 | end | ... | ... |