Skip to content
Snippets Groups Projects
Commit 50f4484e authored by GitLab Release Tools Bot's avatar GitLab Release Tools Bot
Browse files

Merge remote-tracking branch 'dev/12-5-stable' into 12-5-stable

parents 0330bd0a 63af04ca
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
12.5.3-ee
12.5.4
Loading
Loading
@@ -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?
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment