diff options
Diffstat (limited to 'app/finders/groups/user_groups_finder.rb')
-rw-r--r-- | app/finders/groups/user_groups_finder.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/finders/groups/user_groups_finder.rb b/app/finders/groups/user_groups_finder.rb index b58c1323b1f..536b81b2300 100644 --- a/app/finders/groups/user_groups_finder.rb +++ b/app/finders/groups/user_groups_finder.rb @@ -36,9 +36,11 @@ module Groups def by_permission_scope if permission_scope_create_projects? - target_user.manageable_groups(include_groups_with_developer_maintainer_access: true) + Groups::AcceptingProjectCreationsFinder.new(target_user).execute # rubocop: disable CodeReuse/Finder elsif permission_scope_transfer_projects? Groups::AcceptingProjectTransfersFinder.new(target_user).execute # rubocop: disable CodeReuse/Finder + elsif permission_scope_import_projects? + Groups::AcceptingProjectImportsFinder.new(target_user).execute # rubocop: disable CodeReuse/Finder else target_user.groups end @@ -51,5 +53,9 @@ module Groups def permission_scope_transfer_projects? params[:permission_scope] == :transfer_projects end + + def permission_scope_import_projects? + params[:permission_scope] == :import_projects + end end end |