add group to user
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-22 11:52:10 +03:30
parent 096297d1d1
commit 549da39473
6 changed files with 117 additions and 9 deletions
@@ -215,6 +215,17 @@ export class UsersController {
return this.userService.adminUpdateUser(userId, restId, dto);
}
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@Permissions(Permission.MANAGE_USERS)
@ApiHeader(API_HEADER_SLUG)
@ApiOperation({ summary: 'Get user groups for a customer (admin)' })
@ApiParam({ name: 'userId', description: 'User ID' })
@Get('admin/users/:userId/groups')
async adminGetUserGroups(@Param('userId') userId: string, @RestId() restId: string) {
return this.userService.getUserGroups(userId, restId);
}
@UseGuards(AdminAuthGuard)
@ApiBearerAuth()
@Permissions(Permission.MANAGE_USERS)