Commit graph

27 commits

Author SHA1 Message Date
Stan Hu
fa93156528 Defer project destroys within a namespace in Groups::DestroyService#async_execute
Group#destroy would actually hard-delete all associated projects even
though the acts_as_paranoia gem is used, preventing Projects::DestroyService
from doing any work.

We first noticed this while trying to log all projects deletion to the Geo
log.
2017-06-29 09:23:31 -07:00
Tiago Botelho
34f57b462b Fix current feature related specs 2017-06-28 11:32:34 +01:00
Sean McGivern
91f43587a8 Merge branch 'jej-group-name-disclosure' into 'security'
Prevent private group disclosure via parent_id

See merge request !2077
2017-03-29 19:18:38 -07:00
Z.J. van de Weg
597639c096 Fix eslint 2017-03-06 14:58:53 +01:00
Z.J. van de Weg
ddfd09c09c Merge branch 'master' into zj-create-mattermost-team 2017-03-02 10:22:56 +01:00
Z.J. van de Weg
52c4a7866e Improve UX 2017-03-02 10:21:29 +01:00
Luke "Jared" Bennett
f6247600a3
Review changes 2017-02-28 16:32:30 +00:00
Stan Hu
3129dd502b Make nested groups deletion synchronous to avoid potential race 2017-02-27 13:09:55 +02:00
Z.J. van de Weg
9f0e23d609 Fix tests 2017-02-24 13:25:42 +01:00
Z.J. van de Weg
2b0e8b86d8 Merge branch 'master' into zj-create-mattermost-team 2017-02-20 14:05:44 +01:00
Z.J. van de Weg
444d71e043 Transactional mattermost team creation
Before this commit, but still on this feature branch, the creation of
mattermost teams where a background job. However, it was decided it was
better that these happened as transaction so feedback could be displayed
to the user.
2017-02-20 13:41:50 +01:00
Z.J. van de Weg
8ddbc43576 Improve DRYness of views 2017-02-16 09:19:28 +01:00
Z.J. van de Weg
1a0e54b32d Add tests for Mattermost team creation 2017-02-16 09:19:02 +01:00
Z.J. van de Weg
297dc70158 Create MM team for GitLab group 2017-02-16 09:17:40 +01: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