Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-12-26 13:39:12 +0300
committerMarin Jankovski <maxlazio@gmail.com>2014-12-26 13:39:12 +0300
commit92eb3974ac28aff7c78f4ca0cbafbad842fc7160 (patch)
treedaa081e7ef8cd4d1527000dbc5a7aca5caefe9af /app/views/projects/protected_branches
parent770b2a5cfbec1081756bfa2d8bf046b7b16bb638 (diff)
Add option to disable/enable developers push to already protected branches.
Diffstat (limited to 'app/views/projects/protected_branches')
-rw-r--r--app/views/projects/protected_branches/index.html.haml7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml
index 2d04c572c73..183f25bfc82 100644
--- a/app/views/projects/protected_branches/index.html.haml
+++ b/app/views/projects/protected_branches/index.html.haml
@@ -40,8 +40,15 @@
%span.label.label-info default
%span.label.label-success
%i.fa.fa-lock
+ - if branch.developers_can_push
+ %span.label.label-warning
+ %i.fa.fa-group
.pull-right
- if can? current_user, :admin_project, @project
+ - if branch.developers_can_push
+ = link_to 'Disable developers push', [@project, branch, { developers_can_push: false }], data: { confirm: 'Branch will be no longer writable for developers. Are you sure?' }, method: :put, class: "btn btn-grouped btn-small"
+ - else
+ = link_to 'Allow developers to push', [@project, branch, { developers_can_push: true }], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :put, class: "btn btn-grouped btn-small"
= link_to 'Unprotect', [@project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-small"
- if commit = branch.commit