Cleanup /groups/ REST endpoints

UUIDs for groups are the future. Assume the id passed to name a
resource is a URL encoded UUID, and do not use the 'uuid-' prefix.
If we get an invalid UUID but it is an AccountGroup.Id, accept it.

Change-Id: I592ab574c4d6cc7737ee4d32ec379302d199dfaf
This commit is contained in:
Shawn Pearce
2013-01-10 16:03:02 -08:00
parent 3d217418d4
commit 89136bc832
7 changed files with 88 additions and 117 deletions

View File

@@ -63,7 +63,7 @@ public class ListIncludedGroups implements RestReadView<GroupResource> {
try {
GroupControl i = controlFactory.controlFor(u.getIncludeUUID());
if (ownerOfParent || i.isVisible()) {
included.add(GetGroup.parse(i.getGroup()));
included.add(new GetGroup.GroupInfo(i.getGroup()));
}
} catch (NoSuchGroupException notFound) {
log.warn(String.format("Group %s no longer available, included into ",