Support to check via REST if a group is owned by the calling user
It is now possible to list the groups that are owned by a user by GET on '/groups/?owned&user=<user>'. If the 'user' parameter is omitted the owned groups of the calling user are listed. Groups can be added by the 'q' parameter to limit the result to those groups that are of interest to the caller, e.g. if a user wants to check if he owns group 'MyGroup' he can send this request: GET /groups/?owned&q=MyGroup If the group is returned the user owns 'MyGroup'. Change-Id: I09bc99ce0fb60a40320a26d592257408ef2d9c75 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -68,11 +68,12 @@ public class ListGroupsCommand extends BaseCommand {
|
||||
@Inject
|
||||
MyListGroups(final GroupCache groupCache,
|
||||
final GroupControl.Factory groupControlFactory,
|
||||
final GroupControl.GenericFactory genericGroupControlFactory,
|
||||
final Provider<IdentifiedUser> identifiedUser,
|
||||
final IdentifiedUser.GenericFactory userFactory,
|
||||
final Provider<GetGroups> accountGetGroups) {
|
||||
super(groupCache, groupControlFactory, identifiedUser, userFactory,
|
||||
accountGetGroups);
|
||||
super(groupCache, groupControlFactory, genericGroupControlFactory,
|
||||
identifiedUser, userFactory, accountGetGroups);
|
||||
}
|
||||
|
||||
void display(final PrintWriter out) throws NoSuchGroupException {
|
||||
|
Reference in New Issue
Block a user