2016-07-07 03:36:28 -04:00
|
|
|
module ProtectedBranches
|
2016-07-29 02:13:07 -04:00
|
|
|
class UpdateService < BaseService
|
|
|
|
def execute(protected_branch)
|
2016-07-29 03:01:15 -04:00
|
|
|
raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)
|
2016-07-27 00:44:38 -04:00
|
|
|
|
2017-04-05 13:59:46 -04:00
|
|
|
protected_branch.update(params)
|
|
|
|
protected_branch
|
2016-07-07 03:36:28 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|