diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-21 12:17:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-21 12:17:08 +0300 |
commit | 4ecd816dcbbf2c3a83087ea1add13f087530e9eb (patch) | |
tree | faf1d225bf16fa64dea1244217b3f8b6e7dac46d /app/services/groups | |
parent | a293ae1ab5e4253f6003123c79c00bf7b953a7e5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/create_service.rb | 10 | ||||
-rw-r--r-- | app/services/groups/transfer_service.rb | 2 |
2 files changed, 1 insertions, 11 deletions
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index bb577b41fa8..21d3c6499a0 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -92,16 +92,6 @@ module Groups end end - if @group.organization && !can?(current_user, :create_group, @group.organization) - # We are unsetting this here to match behavior of invalid parent_id above and protect against possible - # committing to the database of a value that isn't allowed. - @group.organization = nil - message = s_("CreateGroup|You don't have permission to create a group in the provided organization.") - @group.errors.add(:organization_id, message) - - return false - end - true end diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb index 79557dae14a..9fc1a05476e 100644 --- a/app/services/groups/transfer_service.rb +++ b/app/services/groups/transfer_service.rb @@ -236,7 +236,7 @@ module Groups def ensure_ownership return if @new_parent_group - return unless @group.owners.empty? + return unless @group.all_owner_members.empty? add_owner_on_transferred_group end |