diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-03-23 21:24:06 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-03-26 03:17:27 +0300 |
commit | 1f7328f8ee6a86b1c8e50b7451450e90d78b9424 (patch) | |
tree | f40b736e3e1306df58ff40cd84bead8a0937a8e2 /app/services/protected_branches | |
parent | 391732a2c1b04baf565c77f2788a1ec035b1d85e (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.rb | 2 |
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 |