Age | Commit message (Collapse) | Author |
|
# Conflicts:
# ee/lib/ee/gitlab/git_access.rb
# lib/gitlab/git_access.rb
|
|
When the `changes` passed to `GitAccess` are the literal string `_any`,
which indicates that this is a pre-authorization check, we now check
whether the user can push to any branch in the project in question,
instead of running the per-change check with `oldrev` `_any`, `newrev`
`nil`, and `ref` `nil`.
|
|
|
|
|
|
Validating each commit on ChangeAccess times out if
it already took too long to complete.
Improves the TimedLogger specs to not make use of a stubbed
class anymore
|
|
Adds a #full_message method so that external classes
do not have access to the state of the logger.
Adds a #append_message to always append to the array in-place
|
|
Whenever a git push takes more than 50 seconds the user
will receive a trace from each check performed along with
their timings
|
|
|
|
|
|
Previously overridden in EE but no longer required.
|
|
- Use proper HTTP codes for /api/v4/allowed response
- CustomAction support
|
|
- if #check_custom_action!(cmd) returns something, return from #check()
- now returns :Gitlab::GitAccessResult::Success.new instead of true
|
|
|
|
|
|
Allow builds that have been triggered by a user before terms were
enforced access to git. That way the builds can complete as usual.
|
|
When terms are enforced, but the user has not accepted the terms
access to the API & git is rejected with a message directing the user
to the web app to accept the terms.
|
|
|
|
This will allow to download a repo using the token from the DeployToken
|
|
git 2.16 will fail badly if there are stale worktrees.
Closes #44115
|
|
|
|
Ensure hooks run when a deploy key without a user pushes
Closes #44317
See merge request gitlab-org/gitlab-ce!18057
|
|
|
|
Removes permanent redirects, this means that redirects will only be
possible as long as the old route isn't taken by a new project/group.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We also delete some unused code related to the aforementioned feature.
|
|
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.
Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.
Closes gitlab-org/gitlab-ce#37534.
|
|
This is used in EE for the storage migration, and we want to use this
in CE as well to be able to migrate projects to hashed_storage.
|
|
|
|
This is an amalgamation of:
* Cory Hinshaw: Initial implementation !5552
* Rémy Coutable: Updates !9350
* Nick Thomas: Resolve conflicts and add ED25519 support !13712
|
|
- Adds a new `ProjectMovedError` class to encapsulate that error
condition. Inherits from `NotFoundError` so existing rescues should
continue to work.
- Separating that condition out of `NotFoundError` allowed us to
simplify the `raise_not_found` helper and avoid repeating the literal
string.
- Spec makes use of `ERROR_MESSAGES` hash to avoid repeating literal
error message strings.
|
|
|
|
Because it is sometimes never used.
|
|
|
|
|
|
https://gitlab.com/gitlab-org/gitlab-ce/commit/57e3e942de1adef2c8621905370f07d7da7870c4
I changed it to a separate condition rather than depending on the order of the case-when statements to prevent this mistake again.
|
|
And refactor to self-document a little better.
|
|
No external behavior change.
This allows `GitHttpController` to set the HTTP status based on the type of error. Alternatively, we could have added an attribute to GitAccessStatus, but this pattern seemed appropriate.
|