diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-11 19:52:49 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-08-11 19:52:49 +0300 |
commit | ded60291863d3c7cbf5bc9725c5b0a6ae9110ffa (patch) | |
tree | ac9e05d71b0a6b66520212eb832c4bcc09426790 /app | |
parent | 5a33bc984abfb4ee6243c00bbcc71ccd086d2266 (diff) | |
parent | 32b579e8426094af4b7731d3e91597a377a7ba7e (diff) |
Merge branch '20614-show-member-roles-to-all-users' into 'master'
Show member roles to all users on members page
Closes #20614 and https://gitlab.com/gitlab-org/gitlab-ee/issues/850
See merge request !5776
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/members_helper.rb | 6 | ||||
-rw-r--r-- | app/views/shared/members/_member.html.haml | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index ec106418f2d..877c77050be 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -6,12 +6,6 @@ module MembersHelper "#{action}_#{member.type.underscore}".to_sym end - def default_show_roles(member) - can?(current_user, action_member_permission(:update, member), member) || - can?(current_user, action_member_permission(:destroy, member), member) || - can?(current_user, action_member_permission(:admin, member), member.source) - end - def remove_member_message(member, user: nil) user = current_user if defined?(current_user) diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index 5ae485f36ba..fc6e206d082 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -1,4 +1,4 @@ -- show_roles = local_assigns.fetch(:show_roles, default_show_roles(member)) +- show_roles = local_assigns.fetch(:show_roles, true) - show_controls = local_assigns.fetch(:show_controls, true) - user = member.user |