Allow adding groups as reviewer
On the ChangeScreen it is now possible to add a group as reviewer for a change. When a group is added as reviewer the group is resolved and all its members are added as reviewers to the change. To avoid that users accidentily add groups as reviewers that have a large amount of members, Gerrit administrators can configure a maximum number of reviewers that can be added at once by adding a group as reviewer. In addition Gerrit administrators can configure that users should confirm the adding of the reviewers if the number of reviewers that should be added is over a certain limit. It is also possible to add the system group 'Project Owners' as reviewer. In this case all users which own the project are added as reviewers. If a user and a group have the same name, only the user is added as reviewer. Signed-off-by: Edwin Kempin <edwin.kempin@sap.com> Bug: issue 881 Change-Id: I78a359f89ce045a81306e0a447384c37cda07d00
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
package com.google.gerrit.common.data;
|
||||
|
||||
import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.Project;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwtjsonrpc.client.RemoteJsonService;
|
||||
@@ -32,4 +33,15 @@ public interface SuggestService extends RemoteJsonService {
|
||||
|
||||
void suggestAccountGroup(String query, int limit,
|
||||
AsyncCallback<List<GroupReference>> 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
|
||||
*/
|
||||
void suggestReviewer(Project.NameKey project, String query, int limit,
|
||||
AsyncCallback<List<ReviewerInfo>> callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user