diff options
| author | Jarka Košanová <jarka@gitlab.com> | 2018-12-18 13:15:51 +0100 |
|---|---|---|
| committer | Jarka Košanová <jarka@gitlab.com> | 2018-12-19 15:24:29 +0100 |
| commit | b1c39553859bb1f5f830fa759f2202462fe24d98 (patch) | |
| tree | 235757cdbb225f709ecf105187b69a5f39c711bf /app/models/user.rb | |
| parent | b1b7fa7802eecbacff04a9434eff69b0f3cbaaad (diff) | |
| download | gitlab-ce-b1c39553859bb1f5f830fa759f2202462fe24d98.tar.gz | |
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/models/user.rb')
| -rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index f20756d1cc3..fe63f1ce100 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -709,13 +709,13 @@ class User < ActiveRecord::Base # Returns the groups a user is a member of, either directly or through a parent group def membership_groups - Gitlab::GroupHierarchy.new(groups).base_and_descendants + Gitlab::ObjectHierarchy.new(groups).base_and_descendants end # Returns a relation of groups the user has access to, including their parent # and child groups (recursively). def all_expanded_groups - Gitlab::GroupHierarchy.new(groups).all_groups + Gitlab::ObjectHierarchy.new(groups).all_objects end def expanded_groups_requiring_two_factor_authentication @@ -1153,7 +1153,7 @@ class User < ActiveRecord::Base end def manageable_groups - Gitlab::GroupHierarchy.new(owned_or_maintainers_groups).base_and_descendants + Gitlab::ObjectHierarchy.new(owned_or_maintainers_groups).base_and_descendants end def namespaces |
