Permalink
Browse files

[api] avoid false positive on group search

  • Loading branch information...
1 parent 2979b60 commit 9c3865c9fea6dc1b24c3db6454acc4e4310df4ca @adrianschroeter adrianschroeter committed Sep 12, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/api/app/controllers/request_controller.rb
View
8 src/api/app/controllers/request_controller.rb
@@ -161,12 +161,8 @@ def index
if roles.count == 0 or roles.include? "reviewer"
review_states.each do |r|
-
- # requests where the user is reviewer or own requests that are in review by someone else
- or_in_and = [ "review/@by_group='#{group.title}'" ]
-
-
- inner_or << "(review/@state='#{r}' and (#{or_in_and.join(" or ")}))"
+ # requests where the group is reviewer
+ inner_or << "(review[@state='#{r}' and @by_group='#{group.title}'])"
end
end

0 comments on commit 9c3865c

Please sign in to comment.