summaryrefslogtreecommitdiff
path: root/lib/gitlab/git_access.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-051-5/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-271-6/+8
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-261-15/+15
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-281-2/+9
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Port changes for design management to CEBob Van Landuyt2019-04-291-1/+5
| | | | | | This ports the changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10462/ to CE
* Allow console messages be sent to gitlab-shell9217-warn-on-git-fetch-over-ssh-if-the-secondary-is-lagging-the-primaryAsh McKenzie2019-04-041-1/+5
| | | | Currently a no-op for CE
* Move push size check to EE moduleDouwe Maan2019-01-021-2/+0
| | | | | | # Conflicts: # ee/lib/ee/gitlab/git_access.rb # lib/gitlab/git_access.rb
* Don't run single change checks when changes are unknownDouwe Maan2019-01-021-13/+23
| | | | | | | | 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`.
* Skip change access check for deploy keysDouwe Maan2019-01-021-1/+3
|
* Move magic '_any' string to constantDouwe Maan2019-01-021-1/+5
|
* Iterating through commit list times outTiago Botelho2018-10-251-1/+1
| | | | | | | | 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
* Refactors TimedLogger to be more OOP compliantTiago Botelho2018-10-251-8/+8
| | | | | | | 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
* Adds tracing messages for slow git pushesTiago Botelho2018-10-251-4/+18
| | | | | | Whenever a git push takes more than 50 seconds the user will receive a trace from each check performed along with their timings
* Enable frozen string for lib/gitlab/*.rbgfyoung2018-10-221-0/+2
|
* Fix SpaceInsidePercentLiteralDelimiters copSemyon Pupkov2018-09-201-2/+2
|
* Remove Gitlab::GitAccess#authed_via_jwt?Ash McKenzie2018-09-081-6/+0
| | | | Previously overridden in EE but no longer required.
* Update /api/v4/allowedAsh McKenzie2018-09-061-3/+3
| | | | | - Use proper HTTP codes for /api/v4/allowed response - CustomAction support
* GitAccess#check custom action supportAsh McKenzie2018-09-061-1/+9
| | | | | - if #check_custom_action!(cmd) returns something, return from #check() - now returns :Gitlab::GitAccessResult::Success.new instead of true
* Allow auth via JWT (always false in CE)ash.mckenzie/allow-auth-via-jwtAsh McKenzie2018-08-141-0/+6
|
* Backport some changes from EERubén Dávila2018-07-091-7/+13
|
* Allow triggered builds git accessBob Van Landuyt2018-05-111-1/+5
| | | | | Allow builds that have been triggered by a user before terms were enforced access to git. That way the builds can complete as usual.
* Block access to API & git when terms are enforcedBob Van Landuyt2018-05-101-4/+2
| | | | | | 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.
* Support Deploy Tokens properly without hacking abilitiesKamil Trzciński2018-04-061-2/+2
|
* Implement 'read_repo' for DeployTokensMayra Cabrera2018-04-061-0/+11
| | | | This will allow to download a repo using the token from the DeployToken
* Automatically cleanup stale worktrees and lock files upon a pushStan Hu2018-04-061-0/+5
| | | | | | git 2.16 will fail badly if there are stale worktrees. Closes #44115
* Allow HTTP(s) when git request is made by GitLab CITomasz Maczukin2018-04-051-2/+11
|
* Merge branch 'dm-deploy-keys-default-user' into 'master'Sean McGivern2018-03-291-4/+4
|\ | | | | | | | | | | | | Ensure hooks run when a deploy key without a user pushes Closes #44317 See merge request gitlab-org/gitlab-ce!18057
| * Fall back on ghost user when deploy key user is not setDouwe Maan2018-03-281-4/+4
| |
* | Remove permanent redirectsBob Van Landuyt2018-03-281-7/+3
|/ | | | | 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.
* Respond 404 when repo does not existmk/fix-error-code-for-repo-does-not-existMichael Kozono2018-02-241-1/+1
|
* Fix repo existence check in GitAccessWikiJacob Vosmaer (GitLab)2018-02-221-1/+5
|
* Only check LFS integrity for first branch in pushjej/fix-slow-lfs-object-checkJames Edwards-Jones2018-02-151-3/+6
|
* Check ability ability before proceeding with project specific checksTiago Botelho2018-02-061-18/+23
|
* Moves project creationg to git access check for git pushTiago Botelho2018-02-061-36/+56
|
* Adds documentation for the featureTiago Botelho2018-02-061-2/+6
|
* Abstracts ProjectMoved and ProjectCreated into a BaseProjectTiago Botelho2018-02-061-22/+12
|
* Move new project on push logic to a serviceTiago Botelho2018-02-061-5/+10
|
* Add specsTiago Botelho2018-02-061-8/+3
|
* Adds remote messsage when project is created in a push over SSH or HTTPTiago Botelho2018-02-061-15/+20
|
* Adds option to push over SSH to create a new projectTiago Botelho2018-02-061-1/+1
|
* Adds option to push over HTTP to create a new projectTiago Botelho2018-02-061-5/+24
|
* Allow git pull/push on project redirectsMayra Cabrera2017-12-081-10/+7
|
* refactor code to match EE changesJames Lopez2017-12-071-1/+5
|
* Move all rugged operation for ff_merge inside Gitlab::Gitgitaly-ff-merge-preparationAlejandro Rodríguez2017-10-241-4/+0
| | | | We also delete some unused code related to the aforementioned feature.
* Create idea of read-only databasetc-geo-read-only-ideaToon Claes2017-10-061-2/+7
| | | | | | | | | | | | 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.
* [Backported from EE] Readonly flag for ProjectsGabriel Mazetto2017-09-281-1/+6
| | | | | 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.
* Address review commentsNick Thomas2017-08-301-1/+1
|
* Add settings for minimum key strength and allowed key typeNick Thomas2017-08-301-0/+9
| | | | | | | | This is an amalgamation of: * Cory Hinshaw: Initial implementation !5552 * Rémy Coutable: Updates !9350 * Nick Thomas: Resolve conflicts and add ED25519 support !13712
* Reduce duplication in GitAccess spec around error messagesrs-git-access-spec-speedRobert Speicher2017-08-181-9/+10
| | | | | | | | | | | - 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.