diff options
author | Mark Chao <mchao@gitlab.com> | 2019-03-11 11:52:40 +0300 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2019-03-20 05:50:51 +0300 |
commit | 456320b0e7e8c40271890c684ffba6263b89931d (patch) | |
tree | 47d178cb5c05fde78adc563f3c0c126bbec67360 /app/views | |
parent | 8436b72f4641f1e1de7fd08c91e63e6fe73e54d9 (diff) |
Hide related branches when user does not have permission
Guest user of a project should not see branches
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/issues/show.html.haml | 5 |
1 files changed, 3 insertions, 2 deletions
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 |