From 98a691629d93b2ff3dfbc060b3e25b8ebec6e34b Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Tue, 29 Nov 2016 13:50:57 +0530 Subject: [PATCH 1/4] Hide form inputs for user without access --- app/views/shared/members/_member.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index 8e721c9c8dd..a797e8f0799 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -24,6 +24,7 @@ = link_to source.full_name, source, class: "member-group-link" .hidden-xs.cgray + - expires_soon = member.expires_soon? - if member.request? Requested = time_ago_with_tooltip(member.requested_at) @@ -31,7 +32,7 @@ Joined #{time_ago_with_tooltip(member.created_at)} - if member.expires? · - %span{ class: ('text-warning' if member.expires_soon?) } + %span{ class: "#{"text-warning" if expires_soon} has-tooltip", title: member.expires_at.to_time.in_time_zone.to_s(:medium) } Expires in #{distance_of_time_in_words_to_now(member.expires_at)} - else @@ -47,7 +48,7 @@ - current_resource = @project || @group .controls.member-controls - if show_controls && member.source == current_resource - - if user != current_user + - if user != current_user && can_admin_member = form_for member, remote: true, html: { class: 'form-horizontal js-edit-member-form' } do |f| = f.hidden_field :access_level .member-form-control.dropdown.append-right-5 From 3e4dee01740950ae18927aba2deaec63a4ffdc08 Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Wed, 30 Nov 2016 20:16:32 +0530 Subject: [PATCH 2/4] Changelog entry for issue #24861 --- .../unreleased/24861-stringify-group-member-details.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelogs/unreleased/24861-stringify-group-member-details.yml diff --git a/changelogs/unreleased/24861-stringify-group-member-details.yml b/changelogs/unreleased/24861-stringify-group-member-details.yml new file mode 100644 index 00000000000..a636d43747b --- /dev/null +++ b/changelogs/unreleased/24861-stringify-group-member-details.yml @@ -0,0 +1,4 @@ +--- +title: Hide form inputs for group member without editing rights +merge_request: 7816 +author: Kushal Pandya From 1a36b18122445ebf1014a91cf0b95299bf084ea0 Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Mon, 19 Dec 2016 11:37:29 +0530 Subject: [PATCH 3/4] Remove author name --- changelogs/unreleased/24861-stringify-group-member-details.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/unreleased/24861-stringify-group-member-details.yml b/changelogs/unreleased/24861-stringify-group-member-details.yml index a636d43747b..f56a1060862 100644 --- a/changelogs/unreleased/24861-stringify-group-member-details.yml +++ b/changelogs/unreleased/24861-stringify-group-member-details.yml @@ -1,4 +1,4 @@ --- title: Hide form inputs for group member without editing rights merge_request: 7816 -author: Kushal Pandya +author: From 7cd1b5104a21ab74f5c1a24fac697e90290ae4d9 Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Tue, 28 Feb 2017 23:05:57 +0530 Subject: [PATCH 4/4] Remove unnecessary variable --- app/views/shared/members/_member.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index a797e8f0799..a5aa768b1b2 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -24,7 +24,6 @@ = link_to source.full_name, source, class: "member-group-link" .hidden-xs.cgray - - expires_soon = member.expires_soon? - if member.request? Requested = time_ago_with_tooltip(member.requested_at) @@ -32,7 +31,7 @@ Joined #{time_ago_with_tooltip(member.created_at)} - if member.expires? · - %span{ class: "#{"text-warning" if expires_soon} has-tooltip", title: member.expires_at.to_time.in_time_zone.to_s(:medium) } + %span{ class: "#{"text-warning" if member.expires_soon?} has-tooltip", title: member.expires_at.to_time.in_time_zone.to_s(:medium) } Expires in #{distance_of_time_in_words_to_now(member.expires_at)} - else