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/assets | |
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/assets')
-rw-r--r-- | app/assets/javascripts/issue.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/issue.js b/app/assets/javascripts/issue.js index 94b78907d9a..b3508f36cf9 100644 --- a/app/assets/javascripts/issue.js +++ b/app/assets/javascripts/issue.js @@ -16,7 +16,9 @@ export default class Issue { Issue.createMrDropdownWrap = document.querySelector('.create-mr-dropdown-wrap'); Issue.initMergeRequests(); - Issue.initRelatedBranches(); + if (document.querySelector('#related-branches')) { + Issue.initRelatedBranches(); + } this.closeButtons = $('a.btn-close'); this.reopenButtons = $('a.btn-reopen'); |