summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-03-02 19:13:50 -0300
committerFelipe Artur <felipefac@gmail.com>2016-03-10 10:38:36 -0300
commit5551ccd7201ea6b45a2e2721502ba55e8f525d8f (patch)
tree65d9b9c37f1ed839d4e16953207e82a9629dd9dc /app/finders
parentf2a9ee258e0ee3a6fe0cb614e4b73c56dcd7339d (diff)
downloadgitlab-ce-5551ccd7201ea6b45a2e2721502ba55e8f525d8f.tar.gz
Code improvements
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/groups_finder.rb13
1 files changed, 2 insertions, 11 deletions
diff --git a/app/finders/groups_finder.rb b/app/finders/groups_finder.rb
index a3a8cd541de..ce62f5e762f 100644
--- a/app/finders/groups_finder.rb
+++ b/app/finders/groups_finder.rb
@@ -1,6 +1,5 @@
class GroupsFinder
def execute(current_user = nil)
-
segments = all_groups(current_user)
if segments.length > 1
@@ -15,17 +14,9 @@ class GroupsFinder
def all_groups(current_user)
if current_user
- [current_user.authorized_groups, public_and_internal_groups]
+ [current_user.authorized_groups, Group.unscoped.public_and_internal_only]
else
- [Group.public_only]
+ [Group.unscoped.public_only]
end
end
-
- def public_groups
- Group.unscoped.public_only
- end
-
- def public_and_internal_groups
- Group.unscoped.public_and_internal_only
- end
end