When listing groups don't try to include members for external groups

When listing groups via REST don't try to include members and included
groups for external groups. Members and included groups can only be
listed for internal groups.

Change-Id: I1431a5908549c38b9a55f73baf47af801422909b
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-03-08 16:12:41 +01:00
parent 3f4a022b6b
commit 5aef4f3614
8 changed files with 27 additions and 25 deletions

View File

@@ -16,7 +16,6 @@ package com.google.gerrit.server.account;
import com.google.common.collect.Lists;
import com.google.gerrit.common.errors.NoSuchGroupException;
import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
import com.google.gerrit.extensions.restapi.RestReadView;
import com.google.gerrit.reviewdb.client.Account;
@@ -41,7 +40,7 @@ public class GetGroups implements RestReadView<AccountResource> {
@Override
public List<GroupInfo> apply(AccountResource resource)
throws ResourceNotFoundException, MethodNotAllowedException, OrmException {
throws ResourceNotFoundException, OrmException {
IdentifiedUser user = resource.getUser();
Account.Id userId = user.getAccountId();
List<GroupInfo> groups = Lists.newArrayList();