Skip to content

Commit

Permalink
[api] avoid false positive on group search
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Sep 12, 2012
1 parent 2979b60 commit 9c3865c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/api/app/controllers/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9c3865c

Please sign in to comment.