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:
Edwin Kempin
2011-06-29 14:35:14 +02:00
parent c4af33451e
commit 49cb3e126d
25 changed files with 701 additions and 108 deletions

View File

@@ -138,12 +138,13 @@ public class ModifyReviewersCommand extends BaseCommand {
// Add reviewers
//
result = addReviewerFactory.create(changeId, stringSet(toAdd)).call();
result =
addReviewerFactory.create(changeId, stringSet(toAdd), false).call();
ok &= result.getErrors().isEmpty();
for (ReviewerResult.Error resultError : result.getErrors()) {
String message;
switch (resultError.getType()) {
case ACCOUNT_NOT_FOUND:
case REVIEWER_NOT_FOUND:
message = "account {0} not found";
break;
case ACCOUNT_INACTIVE: