Support recursive group resolution in list members REST endpoint

The '/groups/*/members/' REST endpoint that lists group members
resolves now the included groups recursively if the parameter
'recursive' is specified.

Change-Id: I390ce70be0ee53157292ad1182b607479e4a0fbf
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-01-16 13:44:52 +01:00
parent 2e0c360470
commit 1fb7bfa1ac
2 changed files with 86 additions and 8 deletions

View File

@@ -331,6 +331,45 @@ Lists the members of a group.
]
----
To resolve the included groups of a group recursively and to list all
members the parameter `recursive` can be set.
----
GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/?recursive HTTP/1.0
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json;charset=UTF-8
)]}'
[
{
"kind": "gerritcodereview#member",
"full_name": "Jane Roe",
"id": "1000097",
"account_id": 1000097,
"preferred_email": "jane.roe@example.com",
"user_name": "jane"
},
{
"kind": "gerritcodereview#member",
"full_name": "John Doe",
"id": "1000096",
"account_id": 1000096,
"preferred_email": "john.doe@example.com",
"user_name": "doe"
},
{
"kind": "gerritcodereview#member",
"full_name": "Richard Roe",
"id": "1000098",
"account_id": 1000098,
"preferred_email": "richard.roe@example.com",
"user_name": "richard"
}
]
----
[[included-groups]]
/groups/*/groups/ (List Included Groups)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~