Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
50f4484e
Commit
50f4484e
authored
Dec 10, 2019
by
GitLab Release Tools Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'dev/12-5-stable' into 12-5-stable
parents
0330bd0a
63af04ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
CHANGELOG.md
CHANGELOG.md
+4
-0
VERSION
VERSION
+1
-1
app/services/groups/transfer_service.rb
app/services/groups/transfer_service.rb
+14
-1
No files found.
CHANGELOG.md
View file @
50f4484e
...
...
@@ -2,6 +2,10 @@
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
entry.
## 12.5.4
-
No changes.
## 12.5.3
### Fixed (4 changes)
...
...
VERSION
View file @
50f4484e
12.5.
3-ee
12.5.
4
app/services/groups/transfer_service.rb
View file @
50f4484e
...
...
@@ -39,9 +39,15 @@ module Groups
ensure_ownership
end
post_update_hooks
(
@updated_project_ids
)
true
end
# Overridden in EE
def
post_update_hooks
(
updated_project_ids
)
end
def
ensure_allowed_transfer
raise_transfer_error
(
:group_is_already_root
)
if
group_is_already_root?
raise_transfer_error
(
:same_parent_as_current
)
if
same_parent?
...
...
@@ -96,9 +102,16 @@ module Groups
.
where
(
id:
descendants
.
select
(
:id
))
.
update_all
(
visibility_level:
@new_parent_group
.
visibility_level
)
@group
projects_to_update
=
@group
.
all_projects
.
where
(
"visibility_level > ?"
,
@new_parent_group
.
visibility_level
)
# Used in post_update_hooks in EE. Must use pluck (and not select)
# here as after we perform the update below we won't be able to find
# these records again.
@updated_project_ids
=
projects_to_update
.
pluck
(
:id
)
projects_to_update
.
update_all
(
visibility_level:
@new_parent_group
.
visibility_level
)
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment