From 727ec95528c3b928992406e570427728e7186fd4 Mon Sep 17 00:00:00 2001 From: Mark Chao Date: Mon, 11 Mar 2019 16:52:40 +0800 Subject: Hide related branches when user does not have permission Guest user of a project should not see branches --- app/views/projects/issues/show.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/views/projects/issues/show.html.haml') diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index 3a674da6e87..819d3c4ec76 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -80,8 +80,9 @@ #merge-requests{ data: { url: referenced_merge_requests_project_issue_path(@project, @issue) } } // This element is filled in using JavaScript. - #related-branches{ data: { url: related_branches_project_issue_path(@project, @issue) } } - // This element is filled in using JavaScript. + - if can?(current_user, :download_code, @project) + #related-branches{ data: { url: related_branches_project_issue_path(@project, @issue) } } + // This element is filled in using JavaScript. .content-block.emoji-block.emoji-block-sticky .row -- cgit v1.2.1