summaryrefslogtreecommitdiff
path: root/app/views/protected_branches/shared/_index.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/protected_branches/shared/_index.html.haml')
-rw-r--r--app/views/protected_branches/shared/_index.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/protected_branches/shared/_index.html.haml b/app/views/protected_branches/shared/_index.html.haml
index c204508d355..d0e21e38429 100644
--- a/app/views/protected_branches/shared/_index.html.haml
+++ b/app/views/protected_branches/shared/_index.html.haml
@@ -1,3 +1,4 @@
+- can_admin_entity = protected_branch_can_admin_entity?(protected_branch_entity)
- expanded = expanded_by_default?
%section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } }
@@ -14,7 +15,7 @@
= s_("ProtectedBranch|By default, protected branches restrict who can modify the branch.")
= link_to s_("ProtectedBranch|Learn more."), help_page_path("user/project/protected_branches", anchor: "who-can-modify-a-protected-branch")
- - if can? current_user, :admin_project, @project
+ - if can_admin_entity
= content_for :create_protected_branch
= content_for :branches_list