-
- Downloads
Fixes rejected pushes from maintainers
Before the push git would make a call to `/:namespace/:project/git-receive-pack`. This would perform an access check without a ref. So the `Project#branch_allows_maintainer_push?` would return false. This adjusts `Project#branch_allows_maintainer_push?` to return true when passing no branch name if there are merge requests open that would allow the user to push. The actual check then happens when a call to `/api/v4/internal/allowed` is made from a git hook.
parent
75797ac3
No related branches found
No related tags found
Showing
- app/models/project.rb 8 additions, 4 deletionsapp/models/project.rb
- changelogs/unreleased/bvl-fix-maintainer-push-rejected.yml 6 additions, 0 deletionschangelogs/unreleased/bvl-fix-maintainer-push-rejected.yml
- spec/models/project_spec.rb 5 additions, 0 deletionsspec/models/project_spec.rb
- spec/requests/git_http_spec.rb 17 additions, 0 deletionsspec/requests/git_http_spec.rb
Please register or sign in to comment