AccountApi: Add getGroups method

Add a method to get the groups to which an account belongs.

Note that the test user for some reason does not get included into
the "Anonymous Users" and "Registered Users" groups, while the admin
user does. Fixing this is outside the scope of this commit so it's
left as-is with a TODO to update the test later.

Bug: Issue 7065
Change-Id: If4c2d878adb90b020d74369316953796dbfcb712
This commit is contained in:
David Pursehouse
2017-08-23 08:54:06 +09:00
parent 53147ab906
commit b151e1eb80
5 changed files with 50 additions and 6 deletions

View File

@@ -1134,6 +1134,12 @@ public abstract class AbstractDaemonTest {
return name;
}
protected String createAccount(String name, String group) throws Exception {
name = name(name);
accountCreator.create(name, group);
return name;
}
protected RevCommit getHead(Repository repo, String name) throws Exception {
try (RevWalk rw = new RevWalk(repo)) {
Ref r = repo.exactRef(name);