diff options
author | Jarka Košanová <jarka@gitlab.com> | 2018-12-18 15:15:51 +0300 |
---|---|---|
committer | Jarka Košanová <jarka@gitlab.com> | 2018-12-19 17:24:29 +0300 |
commit | b1c39553859bb1f5f830fa759f2202462fe24d98 (patch) | |
tree | 235757cdbb225f709ecf105187b69a5f39c711bf /app/services | |
parent | b1b7fa7802eecbacff04a9434eff69b0f3cbaaad (diff) |
Rename GroupHierarchy into ObjectHierarchy
- we now use the hierarchy class also for epics
- also rename supports_nested_groups? into supports_nested_objects?
- move it to a concern
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/ci/register_job_service.rb | 2 | ||||
-rw-r--r-- | app/services/groups/nested_create_service.rb | 2 | ||||
-rw-r--r-- | app/services/groups/transfer_service.rb | 2 | ||||
-rw-r--r-- | app/services/users/refresh_authorized_projects_service.rb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/app/services/ci/register_job_service.rb b/app/services/ci/register_job_service.rb index 13321b2682e..6707a1363d0 100644 --- a/app/services/ci/register_job_service.rb +++ b/app/services/ci/register_job_service.rb @@ -118,7 +118,7 @@ module Ci # Workaround for weird Rails bug, that makes `runner.groups.to_sql` to return `runner_id = NULL` groups = ::Group.joins(:runner_namespaces).merge(runner.runner_namespaces) - hierarchy_groups = Gitlab::GroupHierarchy.new(groups).base_and_descendants + hierarchy_groups = Gitlab::ObjectHierarchy.new(groups).base_and_descendants projects = Project.where(namespace_id: hierarchy_groups) .with_group_runners_enabled .with_builds_enabled diff --git a/app/services/groups/nested_create_service.rb b/app/services/groups/nested_create_service.rb index 50d34d8cb91..f01f5656296 100644 --- a/app/services/groups/nested_create_service.rb +++ b/app/services/groups/nested_create_service.rb @@ -18,7 +18,7 @@ module Groups return namespace end - if group_path.include?('/') && !Group.supports_nested_groups? + if group_path.include?('/') && !Group.supports_nested_objects? raise 'Nested groups are not supported on MySQL' end diff --git a/app/services/groups/transfer_service.rb b/app/services/groups/transfer_service.rb index 5efa746dfb9..f64e327416a 100644 --- a/app/services/groups/transfer_service.rb +++ b/app/services/groups/transfer_service.rb @@ -40,7 +40,7 @@ module Groups def ensure_allowed_transfer raise_transfer_error(:group_is_already_root) if group_is_already_root? - raise_transfer_error(:database_not_supported) unless Group.supports_nested_groups? + raise_transfer_error(:database_not_supported) unless Group.supports_nested_objects? raise_transfer_error(:same_parent_as_current) if same_parent? raise_transfer_error(:invalid_policies) unless valid_policies? raise_transfer_error(:namespace_with_same_path) if namespace_with_same_path? diff --git a/app/services/users/refresh_authorized_projects_service.rb b/app/services/users/refresh_authorized_projects_service.rb index 23b63aaabdf..fe5a82e23fa 100644 --- a/app/services/users/refresh_authorized_projects_service.rb +++ b/app/services/users/refresh_authorized_projects_service.rb @@ -102,7 +102,7 @@ module Users end def fresh_authorizations - klass = if Group.supports_nested_groups? + klass = if Group.supports_nested_objects? Gitlab::ProjectAuthorizations::WithNestedGroups else Gitlab::ProjectAuthorizations::WithoutNestedGroups |