diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-22 01:11:24 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-22 01:11:24 +0300 |
commit | 8d544645f0ef114586212835cf011a3e268c9ec1 (patch) | |
tree | 4ffb1d46f923bfe2f25b194f9ad0411b3a5e008e /app/finders | |
parent | 261569b2466e455ff308cc54fb1db51bc8dc2880 (diff) |
Add specs and add visibility level to admin groups
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/group_projects_finder.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/finders/group_projects_finder.rb b/app/finders/group_projects_finder.rb index 2470af7c685..3b9a421b118 100644 --- a/app/finders/group_projects_finder.rb +++ b/app/finders/group_projects_finder.rb @@ -1,19 +1,18 @@ class GroupProjectsFinder < UnionFinder def initialize(group, options = {}) - @group = group + @group = group @options = options end def execute(current_user = nil) segments = group_projects(current_user) - find_union(segments, Project) end private def group_projects(current_user) - only_owned = @options.fetch(:only_owned, false) + only_owned = @options.fetch(:only_owned, false) only_shared = @options.fetch(:only_shared, false) projects = [] |