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:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-23 21:24:06 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-26 03:17:27 +0300
commit1f7328f8ee6a86b1c8e50b7451450e90d78b9424 (patch)
treef40b736e3e1306df58ff40cd84bead8a0937a8e2 /app/services/protected_branches
parent391732a2c1b04baf565c77f2788a1ec035b1d85e (diff)
Branch unprotection restriction starting point
Explored Policy framework to create something I can use as a starting point.
Diffstat (limited to 'app/services/protected_branches')
-rw-r--r--app/services/protected_branches/update_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/protected_branches/update_service.rb b/app/services/protected_branches/update_service.rb
index 4b3337a5c9d..95e46645374 100644
--- a/app/services/protected_branches/update_service.rb
+++ b/app/services/protected_branches/update_service.rb
@@ -1,7 +1,7 @@
module ProtectedBranches
class UpdateService < BaseService
def execute(protected_branch)
- raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)
+ raise Gitlab::Access::AccessDeniedError unless can?(current_user, :update_protected_branch, protected_branch)
protected_branch.update(params)
protected_branch