SuggestService visibility logic updated.
The SuggestService previously used the project to determine if a suggested user should be returned. The RPC was updated to use the change to determine if a suggested user can see the change. This is implemented as a new RPC, deprecating the old one, so the API does not break unexpectly for direct API users. This change is moving toward the goal of not using GroupMembership.getKnownGroups(), so as to support almost any group system. Change-Id: I63a8bca720d0cc77b4a9f3820e1d6ebe8966afc4
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.reviewdb.client.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
@@ -34,14 +35,21 @@ public interface SuggestService extends RemoteJsonService {
|
||||
void suggestAccountGroup(String query, int limit,
|
||||
AsyncCallback<List<GroupReference>> callback);
|
||||
|
||||
/**
|
||||
* @see #suggestChangeReviewer(com.google.gerrit.reviewdb.client.Change.Id, String, int, AsyncCallback)
|
||||
*/
|
||||
@Deprecated
|
||||
void suggestReviewer(Project.NameKey project, String query, int limit,
|
||||
AsyncCallback<List<ReviewerInfo>> callback);
|
||||
|
||||
/**
|
||||
* Suggests reviewers. A reviewer can be a user or a group. Inactive users,
|
||||
* the system groups {@link AccountGroup#ANONYMOUS_USERS} and
|
||||
* {@link AccountGroup#REGISTERED_USERS} and groups that have more than the
|
||||
* configured <code>addReviewer.maxAllowed</code> members are not suggested as
|
||||
* reviewers.
|
||||
* @param project the project for which reviewers should be suggested
|
||||
* @param changeId the change for which reviewers should be suggested
|
||||
*/
|
||||
void suggestReviewer(Project.NameKey project, String query, int limit,
|
||||
void suggestChangeReviewer(Change.Id changeId, String query, int limit,
|
||||
AsyncCallback<List<ReviewerInfo>> callback);
|
||||
}
|
||||
|
Reference in New Issue
Block a user