Include name of owner group into GroupInfo

The GroupInfo only contained the UUID of the owner group. Now in
addition the name of the owner group is included. This saves one
request when displaying the group info in the UI since there is no
need to fetch the name of the owner group with an own request. This
also fixes a wrong message in the UI. When the owner group was not
visible the name of the owner group could not be looked up and the UI
told it's a deleted reference.

Change-Id: I36082fb693a5b83bae26232a5de606d27956e220
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-02-11 12:39:13 +01:00
parent f807bc3836
commit c6993fb005
16 changed files with 157 additions and 100 deletions

View File

@@ -23,7 +23,8 @@ import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.account.GetGroups;
import com.google.gerrit.server.account.GroupCache;
import com.google.gerrit.server.account.GroupControl;
import com.google.gerrit.server.group.GroupInfo;
import com.google.gerrit.server.group.GroupJson;
import com.google.gerrit.server.group.GroupJson.GroupInfo;
import com.google.gerrit.server.group.ListGroups;
import com.google.gerrit.server.ioutil.ColumnFormatter;
import com.google.gerrit.sshd.BaseCommand;
@@ -73,9 +74,10 @@ public class ListGroupsCommand extends BaseCommand {
final GroupControl.GenericFactory genericGroupControlFactory,
final Provider<IdentifiedUser> identifiedUser,
final IdentifiedUser.GenericFactory userFactory,
final Provider<GetGroups> accountGetGroups) {
final Provider<GetGroups> accountGetGroups,
final GroupJson json) {
super(groupCache, groupControlFactory, genericGroupControlFactory,
identifiedUser, userFactory, accountGetGroups);
identifiedUser, userFactory, accountGetGroups, json);
}
void display(final PrintWriter out) throws NoSuchGroupException {