Commit Graph

14 Commits

Author SHA1 Message Date
Stan Hu 3129dd502b Make nested groups deletion synchronous to avoid potential race 2017-02-27 13:09:55 +02:00
Stan Hu 6606a45030 Fix a number of race conditions that can occur during namespace deletion
There are two problems in the current implementation:

1. If a project is marked for deletion via the `pending_delete` flag
and then the namespace was quickly deleted, it's possible that the
namespace skips over that project and leaves that project in
an orphaned state.

2. Before namespace deletion, the namespace attempts to clean up
all the relevant storage paths. However, if all projects have been
removed synchronously, then the namespace will not be able to clean anything.
To prevent this, we should load the paths to be deleted before
actually destroying projects.

The specs were missing this second case due to a permission issue
that caused project removal never to happen.
2017-02-15 23:56:40 -08:00
dixpac 0dacf3c169 Fix inconsistent naming for services that delete things
* Changed name of delete_user_service and worker to destroy
* Move and change delete_group_service to Groups::DestroyService
* Rename Notes::DeleteService to Notes::DestroyService
2017-02-08 09:16:43 +01:00
Dmitriy Zaporozhets 283e868ef5
Refactor nested group related code
* Simplify code around group parent access check
* Rename 'Nested groups' to 'Subgroups' tab at group#show page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-29 19:18:05 +02:00
Dmitriy Zaporozhets 9410f215ea
Add nested groups support to the Groups::CreateService
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-26 11:56:19 +02:00
James Lopez b82fdf6257 Fix error 500 renaming group. Also added specs and changelog. 2016-12-20 17:52:27 +01:00
Rydkin Maxim 170efaaba2 Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741 2016-12-16 21:37:22 +03:00
Douwe Maan 31266c5be4 Address feedback 2016-03-22 00:09:20 +01:00
Douwe Maan 45e8650c4f Fix specs 2016-03-20 23:26:58 +01:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Zeger-Jan van de Weg b959ae553b Improve group visibility level feature 2016-03-18 16:58:04 -03:00
Felipe Artur 0a7f716119 Code fixes 2016-03-17 19:42:46 -03:00
Felipe Artur ec20fdf366 Code improvements and add Create group service 2016-03-16 19:44:33 -03:00
Felipe Artur c3e70280df Prevent projects to have higher visibility than groups
Prevent Groups to have smaller visibility than projects
Add default_group_visibility_level to configuration
Code improvements
2016-03-10 10:38:36 -03:00