diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 21:13:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-07 21:13:36 +0000 |
commit | c19944d9970b788d8523cee6ee05217a8afd7646 (patch) | |
tree | e2d15e8c0d541b9b2fe26b9b82f23661df120f94 /lib/api/commits.rb | |
parent | 3ff3d897d6529aabb21aa6aed54eb430a9cf0fe2 (diff) | |
download | gitlab-ce-c19944d9970b788d8523cee6ee05217a8afd7646.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r-- | lib/api/commits.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index fa99a1a2bc8..2f52bf8b701 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -20,6 +20,8 @@ module API end def authorize_push_to_branch!(branch) + authenticate! + unless user_access.can_push_to_branch?(branch) forbidden!("You are not allowed to push into this branch") end @@ -127,6 +129,8 @@ module API tags %w[commits] failure [ { code: 400, message: 'Bad request' }, + { code: 401, message: 'Unauthorized' }, + { code: 403, message: 'Forbidden' }, { code: 404, message: 'Not found' } ] detail 'This feature was introduced in GitLab 8.13' |