summaryrefslogtreecommitdiff
path: root/app/finders/groups_finder.rb
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2018-11-01 15:20:54 +0000
committerClement Ho <clemmakesapps@gmail.com>2018-11-01 15:20:54 +0000
commit3c99d8308a481b3f6edb002912ffc4d760b7fb64 (patch)
tree73555ed44c63103ae57836dd00587e45d084dff2 /app/finders/groups_finder.rb
parent0336dc438b6faab575df996364076b57e388cc27 (diff)
parentd3a407d66fa553f3ff8afd1b9e42f01b9912e14a (diff)
downloadgitlab-ce-gl-ui-progress-bar.tar.gz
Merge branch 'master' into 'gl-ui-progress-bar'gl-ui-progress-bar
# Conflicts: # app/assets/javascripts/commons/gitlab_ui.js
Diffstat (limited to 'app/finders/groups_finder.rb')
-rw-r--r--app/finders/groups_finder.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/app/finders/groups_finder.rb b/app/finders/groups_finder.rb
index a35a3ed6142..ea954f98220 100644
--- a/app/finders/groups_finder.rb
+++ b/app/finders/groups_finder.rb
@@ -40,7 +40,6 @@ class GroupsFinder < UnionFinder
attr_reader :current_user, :params
- # rubocop: disable CodeReuse/ActiveRecord
def all_groups
return [owned_groups] if params[:owned]
return [groups_with_min_access_level] if min_access_level?
@@ -52,7 +51,6 @@ class GroupsFinder < UnionFinder
groups << Group.none if groups.empty?
groups
end
- # rubocop: enable CodeReuse/ActiveRecord
def groups_for_ancestors
current_user.authorized_groups
@@ -82,11 +80,9 @@ class GroupsFinder < UnionFinder
end
# rubocop: enable CodeReuse/ActiveRecord
- # rubocop: disable CodeReuse/ActiveRecord
def owned_groups
current_user&.owned_groups || Group.none
end
- # rubocop: enable CodeReuse/ActiveRecord
def include_public_groups?
current_user.nil? || all_available?