Add filtering for accessible review requests.
Review Request #1932 — Created Nov. 16, 2010 and submitted
Add filtering for accessible review requests. When querying review requests, only those that are accessible will now be returned. This uses the same criteria as that used in ReviewRequest.is_accessible_by(). The accessibility of the Repository and the Review Groups will be checked during the query. In order to embed the queries needed, RepositoryManager.accessible_q and GroupManager.accessible_q functions have been added. These return a Q() object that represents the accessibility query checks. They can take a prefix for the variables so that they can be used with a relation in another query. The existing accessible() functions now just wrap these queries.