Commit Graph

24 Commits

Author SHA1 Message Date
GitLab Bot ebc589e90c Add latest changes from gitlab-org/gitlab@master 2021-06-10 03:10:01 +00:00
GitLab Bot d6d1051383 Add latest changes from gitlab-org/gitlab@master 2021-04-22 21:09:53 +00:00
GitLab Bot 5b2abea8db Add latest changes from gitlab-org/gitlab@master 2021-03-29 18:09:37 +00:00
GitLab Bot ff06f859cd Add latest changes from gitlab-org/gitlab@master 2020-11-10 15:09:14 +00:00
GitLab Bot 640e72ca92 Add latest changes from gitlab-org/gitlab@master 2020-06-04 03:08:05 +00:00
Fabio Papa 0b708e5d36 Style rules; Revert some examples 2019-07-19 13:00:05 -07:00
Fabio Papa 4b572f807c Make subgroup_creation_level default to maintainer at SQL level
- Migration updates existing groups to "owner", then sets default to
  "maintainer" so that new groups will default to that
- Update spec examples
2019-07-19 12:06:57 -07:00
Fabio Papa a2cd8e0dab Style rules; Revert some examples 2019-07-19 12:06:57 -07:00
Fabio Papa 832f668f29 Apply changes recomended by merge request coach 2019-07-19 12:06:56 -07:00
Fabio Papa 44bd74cd0e Make subgroup_creation_level default to maintainer at SQL level
- Migration updates existing groups to "owner", then sets default to
  "maintainer" so that new groups will default to that
- Update spec examples
2019-07-19 12:06:56 -07:00
Fabio Papa 97b1f48e97 Style rules; Revert some examples 2019-07-19 12:06:56 -07:00
Fabio Papa d4c53e1799 Apply changes recomended by merge request coach 2019-07-19 11:55:49 -07:00
Fabio Papa 81662f7b9f Make subgroup_creation_level default to maintainer at SQL level
- Migration updates existing groups to "owner", then sets default to
  "maintainer" so that new groups will default to that
- Update spec examples
2019-07-19 11:55:48 -07:00
Fabio Papa 13d9c5dda2 Style rules; Revert some examples 2019-07-19 11:55:47 -07:00
Fabio Papa 7d061212b1 Add examples specing the setting to choose who can create subgroups
This setting is at the group level only. The default is specified to
be maintainers and owners.

**Specs only**, all failing.
2019-07-19 11:55:45 -07:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Gosia Ksionek 64858317ad Add part of needed code
Add columns to store project creation settings

Add project creation level column in groups
 and default project creation column in application settings

Remove obsolete line from schema

Update migration with project_creation_level column existence check

Rename migrations to avoid conflicts

Update migration methods

Update migration method
2019-04-05 18:49:46 +00:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Nick Thomas 5c602e306c Limit non-administrators to adding 100 members at a time to groups and projects 2017-06-06 16:04:26 +01:00
Dmitriy Zaporozhets bae1644015
Refactor Admin::GroupsController#members_update method and add some specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-04-20 19:25:02 +03:00
Robert Speicher 4642ca6686 Use `empty_project` where possible in controller specs 2017-01-25 17:14:38 -05:00
Kamil Trzcinski e8aab1cd15 This fixes a long running tests due to changed Sidekiq state 2016-08-15 23:26:40 +02:00
Stan Hu cb8a425ba4 Fix bug where destroying a namespace would not always destroy projects
There is a race condition in DestroyGroupService now that projects are deleted asynchronously:

1. User attempts to delete group
2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project
3. DestroyGroupService destroys the Group, leaving all its projects without a namespace
4. Projects::DestroyService runs later but the can?(current_user,
   :remove_project) is `false` because the user no longer has permission to
   destroy projects with no namespace.
5. This leaves the project in pending_delete state with no namespace/group.

Projects without a namespace or group also adds another problem: it's not possible to destroy the container
registry tags, since container_registry_path_with_namespace is the wrong value.

The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService.

Closes #17893
2016-08-11 15:36:35 -07:00