Commit graph

6 commits

Author SHA1 Message Date
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