summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorSam Rose <samrose3@gmail.com>2017-05-08 07:41:58 +0000
committerPhil Hughes <me@iamphill.com>2017-05-08 07:41:58 +0000
commit1ebd9dad8e4a3ade4fa829d1d5ac6cbc9825bf48 (patch)
treeea175b4ef388f79d8550a424ac5b46a535555664 /app/policies
parent1a5e84febeb3f2d63c019981e80c777195c37dd2 (diff)
downloadgitlab-ce-1ebd9dad8e4a3ade4fa829d1d5ac6cbc9825bf48.tar.gz
Add confirm delete protected branch modal
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/project_policy.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb
index 8f25ac30a22..3959b895f44 100644
--- a/app/policies/project_policy.rb
+++ b/app/policies/project_policy.rb
@@ -98,7 +98,7 @@ class ProjectPolicy < BasePolicy
end
def master_access!
- can! :push_code_to_protected_branches
+ can! :delete_protected_branch
can! :update_project_snippet
can! :update_environment
can! :update_deployment
@@ -173,7 +173,7 @@ class ProjectPolicy < BasePolicy
def archived_access!
cannot! :create_merge_request
cannot! :push_code
- cannot! :push_code_to_protected_branches
+ cannot! :delete_protected_branch
cannot! :update_merge_request
cannot! :admin_merge_request
end
@@ -211,7 +211,7 @@ class ProjectPolicy < BasePolicy
unless repository_enabled
cannot! :push_code
- cannot! :push_code_to_protected_branches
+ cannot! :delete_protected_branch
cannot! :download_code
cannot! :fork_project
cannot! :read_commit_status