summaryrefslogtreecommitdiff
path: root/spec/services/projects
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'dev/security' into 'master'Rémy Coutable2016-10-061-2/+23
|\ | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * Enforce the fork_project permission in Projects::CreateServiceNick Thomas2016-09-271-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | Projects::ForkService delegates to this service almost entirely, but needed one small change so it would propagate create errors correctly. CreateService#execute needs significant refactoring; it is now right at the complexity limit set by Rubocop. I avoided doing so in this commit to keep the diff as small as possible. Several tests depend on the insecure behaviour of ForkService, so fi them up at the same time.
* | Fix project deletion when feature visibility is set to privatesh-fix-project-deletion-private-visibilityStan Hu2016-10-041-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Projects that are destroyed are put in the pending_delete state. The ProjectDestroyWorker checks whether the current user has access, but since the ProjectFeature class uses the default scope of the Project, it will not be able to find the right project. This was a regression in 8.12 that caused the following stack trace: ``` NoMethodError: undefined method `team' for nil:NilClass from app/models/project_feature.rb:62:in `get_permission' from app/models/project_feature.rb:34:in `feature_available?' from app/models/project.rb:21:in `feature_available?' from app/policies/project_policy.rb:170:in `disabled_features!' from app/policies/project_policy.rb:29:in `rules' from app/policies/base_policy.rb:82:in `block in abilities' from app/policies/base_policy.rb:113:in `collect_rules' from app/policies/base_policy.rb:82:in `abilities' from app/policies/base_policy.rb:50:in `abilities' from app/models/ability.rb:64:in `uncached_allowed' from app/models/ability.rb:58:in `allowed' from app/models/ability.rb:49:in `allowed?' from app/services/base_service.rb:11:in `can?' from lib/gitlab/metrics/instrumentation.rb:155:in `block in can?' from lib/gitlab/metrics/method_call.rb:23:in `measure' from lib/gitlab/metrics/instrumentation.rb:155:in `can?' from app/services/projects/destroy_service.rb:18:in `execute' ``` Closes #22948
* | fix broken repo 500 errors in UI and added relevant specsJames Lopez2016-09-291-0/+10
|/
* Reset pushes_since_gc counter before specs run to ensure starting point is 0sh-reset-pushes-since-gc-beforeStan Hu2016-09-181-0/+4
|
* Move pushes_since_gc to Redispushes-since-gc-redisYorick Peterse2016-09-131-22/+7
| | | | | | | | | | | | This moves tracking of the pushes since the last Git GC from PostgreSQL to Redis. This reduces the number of writes on the "projects" table. This in turn reduces the vacuuming overhead. The lease used for incrementing the counter has been removed. This lease was mostly put in place to prevent high database load but this isn't needed anymore due to the counter now being stored in Redis. Fixes gitlab-org/gitlab-ce#22125
* Project tools visibility levelFelipe Artur2016-09-011-3/+3
|
* adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-094-23/+23
|
* Namespace EnableDeployKeyService under ProjectsZ.J. van de Weg2016-08-081-0/+27
|
* Get rid of `is_image` in FileUploaderRémy Coutable2016-07-192-12/+0
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Reset project pushes_since_gc when we enqueue the git gc callPaco Guzman2016-07-121-9/+33
|
* Expire the branch cache after `git gc` runsStan Hu2016-07-121-2/+2
| | | | | | | Due to a stale NFS cache, it's possible that a branch lookup fails while `git gc` is running and causes missing branches in merge requests. Possible workaround for #15392
* Enable Style/EmptyLines cop, remove redundant onesrubocop/enable-cops-for-empty-linesGrzegorz Bizon2016-07-011-1/+0
|
* Refactor repository paths handling to allow multiple git mount pointsAlejandro Rodríguez2016-06-292-7/+7
|
* Project members with guest role can't access confidential issuesDouglas Barbosa Alexandre2016-06-131-0/+12
|
* Make Omniauth providers specs to not modify global configurationKamil Trzcinski2016-06-081-1/+1
|
* fix import service specJames Lopez2016-06-021-1/+1
|
* Fix forks creation when visibility level is restrictedissue_10725Felipe Artur2016-05-251-0/+27
|
* Use container registry config stubKamil Trzcinski2016-05-161-7/+1
|
* Improve test coverageKamil Trzcinski2016-05-162-0/+40
|
* Enable the Rubocop DeprecatedClassMethods copConnor Shea2016-05-082-6/+6
| | | | | | This reports uses of `File.exists?` and `Dir.exists?`, which were both deprecated in Ruby and will eventually be removed in favor of `.exist?`. Also fixes all existing uses of the deprecated methods.
* Backport GitHub Enterprise import support from EEStan Hu2016-04-261-3/+10
| | | | | | | | | | These changes were pulled from GitLab EE to support configuring an alternative API URL than the default https://api.github.com. In addition, the `verify_ssl` flag allows users to disable SSL cert checking. One modification: add a default `args` option if it does not exist to avoid breaking existing configurations.
* Setup visibility level for project when transfering for a groupFelipe Artur2016-04-131-0/+23
|
* Flush repository cache before import project datafix-gh-pr-importDouglas Barbosa Alexandre2016-04-041-0/+17
| | | | | GitHub Pull Requests importer handle with the repository while importing data, we need to make sure that the cached values are valid.
* Merge branch 'fix_remove_fork_link' into 'master' Douwe Maan2016-04-041-0/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove fork link closes all merge requests opened on source project Currently, if you: - create a fork - open a merge request on the source project - remove the fork link The created MR cannot be closed. With this MR, all pending MR is closed when the fork link is removed. See merge request !3189
| * Fix rubocop in unlink fork service specsBaldinof2016-04-031-2/+2
| |
| * Move unlink fork logic to a serviceBaldinof2016-03-221-0/+32
| |
* | Merge branch 'no-gc-retry' into 'master' Robert Speicher2016-03-181-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | Do not retry "git gc" To prevent 'git gc' timing out on a large repo and then bouncing around in the retry queue. See merge request !3266
| * | Fix HousekeepingService testsno-gc-retryJacob Vosmaer2016-03-181-2/+2
| | |
* | | Restrict access for confidential issues on autocompleteDouglas Barbosa Alexandre2016-03-171-0/+79
|/ /
* | Use an exception to pass messagesJacob Vosmaer2016-03-151-3/+3
| |
* | Use strings instead of symbolsauto-gcJacob Vosmaer2016-03-141-3/+3
| |
* | Run 'git gc' every 10 pushesJacob Vosmaer2016-03-141-1/+9
| |
* | Allow project housekeeping only once an hourJacob Vosmaer2016-03-141-0/+40
|/
* Make better use of the `visibility_level` factory traitsrs-traits-are-goodRobert Speicher2016-03-081-2/+2
|
* Extract Projects::ImportService service from RepositoryImportWorkerDouglas Barbosa Alexandre2016-01-251-0/+106
|
* Fix creator should be added as a master of the project on creationDouglas Barbosa Alexandre2016-01-191-0/+1
|
* DRY up upload and download servicesapi-project-uploadDouwe Maan2016-01-081-12/+12
|
* Add some specs for forked project visibility_level casesTomasz Maczukin2015-12-241-0/+39
|
* Add spec for invalid options in project creationStan Hu2015-12-091-0/+7
|
* Tag service specsDouwe Maan2015-12-097-7/+7
|
* Fix specsDouwe Maan2015-11-181-12/+5
|
* Expose CI enable option in project featuresKamil Trzcinski2015-11-132-1/+23
| | | | - Enable CI by default for all new projects
* Fix: Images cannot show when projects' path was changeduploads_path_fixValery Sizov2015-10-143-6/+2
|
* Fix testsDmitriy Zaporozhets2015-10-021-8/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Remove unnecessary fork ci logicDmitriy Zaporozhets2015-10-021-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* remove API calls from CE to CIci_closer_integrationValery Sizov2015-09-181-1/+2
|
* Import forked repositories asynchronously to prevent large repositories from ↵Stan Hu2015-09-112-3/+13
| | | | | | | | | timing out Use import_status to track async import status and give feedback to the user Closes #2388 Closes #2400
* Merge branch 'global_labels' into 'master'Dmitriy Zaporozhets2015-09-091-0/+8
|\ | | | | | | | | | | | | | | Global labels https://dev.gitlab.org/gitlab/gitlabhq/issues/2353 See merge request !1240
| * added spinach for glabal labelsglobal_labelsValery Sizov2015-09-031-0/+8
| |