summaryrefslogtreecommitdiff
path: root/spec/models/namespace_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'dz-limit-nested-groups' into 'master' Douwe Maan2017-02-081-11/+22
|\ | | | | | | | | Limit level of nesting for groups See merge request !9000
| * Limit level of nesting for groupsdz-limit-nested-groupsDmitriy Zaporozhets2017-02-081-11/+22
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Refresh authorizations when transferring projectsrefresh-permissions-when-moving-projectsYorick Peterse2017-02-071-0/+7
|/ | | | | | | | This ensures that project authorizations are refreshed when moving a project from one namespace to another. When doing so the permissions for all users of both the old and new namespaces are refreshed. See #26194 for more information.
* Use `:empty_project` where possible in model specsrs-empty_project-modelsRobert Speicher2017-01-261-2/+2
|
* Merge branch 'dz-nested-groups-access-improvements' into 'master' Dmitriy Zaporozhets2017-01-251-6/+22
|\ | | | | | | | | Nested groups feature improvemetns See merge request !8448
| * Refactor Namespace code related to nested groupsDmitriy Zaporozhets2017-01-131-6/+22
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Merge branch 'fix/rename-group-export-vuln' into 'security' Robert Speicher2017-01-231-2/+9
|/ | | | | Fix export files not removed when a user takes over a namespace See merge request !2051
* Add more storage statisticsMarkus Koller2016-12-211-0/+45
| | | | | | | | | | | | | This adds counters for build artifacts and LFS objects, and moves the preexisting repository_size and commit_count from the projects table into a new project_statistics table. The counters are displayed in the administration area for projects and groups, and also available through the API for admins (on */all) and normal users (on */owned) The statistics are updated through ProjectCacheWorker, which can now do more granular updates with the new :statistics argument.
* Merge branch 'dz-nested-groups-title-ui' into 'master' Sean McGivern2016-12-161-0/+22
|\ | | | | | | | | UI improvements for nested group feature See merge request !8062
| * Refactor Namespace#parents methoddz-nested-groups-title-uiDmitriy Zaporozhets2016-12-151-1/+7
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * Add tests for Namespace#full_name methodDmitriy Zaporozhets2016-12-131-0/+8
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * Add parents method to NamespaceDmitriy Zaporozhets2016-12-131-0/+8
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Modify namespace name and path validationdz-remove-namespaces-path-uniqDmitriy Zaporozhets2016-12-121-5/+1
|/ | | | | | | | | | | Currently namespace name and path have uniq validaiton which does not allow us to use same group name/path inside different groups. This commit changes validation in next way: * Allow same namespace name with different parent_id * Allow same namespace path. Uniq validation should be handled by routes table Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'dz-nested-groups' into 'master' Douwe Maan2016-12-091-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add nested groups support on data level ## What does this MR do? - [x] Add `parent_id` field to `Namespace`model. - [x] Create new database table `routes` that keeps information about full path to each group or project - [x] Remove uniq index from `namespaces.path` - [x] Add uniq index on `routes.path` - [x] Fill routes table with path data from namespaces and projects - [x] Change Namespace/Project URL lookup by routes table - [x] Rename related routes (nested groups, projects) when parent path changes This is solely backend preparation. UI, Permissions and API support will be added in separate merge request. ## Are there points in the code the reviewer needs to double check? migrations, Route model, Routable concern Will require downtime. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7121#note_19490281 discussion ## Why was this MR needed? One step further to full nested groups support ## Screenshots (if relevant) No UI changes in this merge request so far ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added~~ - ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/2772 See merge request !7121
| * Add nested groups support on data leveldz-nested-groupsDmitriy Zaporozhets2016-12-081-0/+8
| | | | | | | | | | | | | | | | * add parent_id field to namespaces table to store relation with nested groups * create routes table to keep information about full path of every group and project * project/group lookup by full path from routes table Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Use :maximum instead of :within for length validators with a 0..N range25209-improve-length-validatorsRémy Coutable2016-12-061-3/+10
|/ | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Correct namespace validation to forbid bad names #21077Will Starms2016-10-071-0/+1
| | | | | | Adds .git and .atom to the master namespace regex Updates existing group tests and adds two new ones Updates path cleaning to also forbid .atom
* adds second batch of tests changed to active tenseactive-tense-test-coveragetiagonbotelho2016-08-091-3/+3
|
* Avoid `describe`-ing symbols in specsrs-describe-symbolsRobert Speicher2016-07-121-4/+4
|
* 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-291-2/+8
|
* Improve test coverageKamil Trzcinski2016-05-161-0/+14
|
* Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-15/+0
| | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
* Corrected spec title for Namespace.searchYorick Peterse2016-03-111-1/+1
|
* Make Namespace.search case-insensitiveYorick Peterse2016-03-111-5/+24
| | | | | This ensures searching namespaces works exactly the same as searching for any other resource.
* Annotate modelsStan Hu2016-01-061-1/+0
|
* Tag model specsDouwe Maan2015-12-091-1/+1
|
* Annotate modelsDmitriy Zaporozhets2015-11-131-0/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Update mock and stub syntax for specsRobert Speicher2015-06-221-3/+3
|
* Move files for moved namespaces.Douwe Maan2015-03-311-2/+0
|
* Move User.cleanup_username to Namespace.cleanup_path.Douwe Maan2015-03-271-0/+10
|
* Fix import check for case sensetive namespacesDmitriy Zaporozhets2015-03-021-0/+10
|
* Updated rspec to rspec 3.x syntaxJeroen van Baarsen2015-02-121-15/+15
| | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Remove mass assgnment specsDmitriy Zaporozhets2014-06-261-2/+0
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Re-annotate modelsDmitriy Zaporozhets2014-04-091-2/+3
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Annotate!Dmitriy Zaporozhets2013-10-011-1/+1
|
* Fix typosJohannes Schleifenbaum2013-07-291-1/+1
|
* Move directory logic out of model. Use Gitlab:Shell class to interact with ↵Dmitriy Zaporozhets2013-03-211-1/+1
| | | | file system
* reannotatedDmitriy Zaporozhets2013-03-151-7/+8
|
* Refactor abilities. Added ProjectUpdate context. Fixed few bugs with namespacesDmitriy Zaporozhets2012-11-291-1/+2
|
* Increased test coverageDmitriy Zaporozhets2012-11-211-0/+42
|
* Allow project creation in scope of group for non-admin but group ownersDmitriy Zaporozhets2012-11-251-0/+10
|
* ReannotatedDmitriy Zaporozhets2012-11-241-0/+13
|
* Fix model testsDmitriy Zaporozhets2012-11-231-2/+2
|
* Move directory with project. Fixed all related path methods to use namespaceDmitriy Zaporozhets2012-11-221-0/+12