feat(adm): split chat and billing settings and add a master login
Super admin can filter dashboard counts, edit or delete admins, and sign into a user's CRM account with one shared password. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Patch,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
@@ -16,6 +18,8 @@ import {
|
||||
CreatePlatformAdminDto,
|
||||
CreatePlatformOrganizationDto,
|
||||
ResetPlatformAdminPasswordDto,
|
||||
SetMasterPasswordDto,
|
||||
UpdatePlatformAdminDto,
|
||||
ResetPlatformUserPasswordDto,
|
||||
UpdateOrgModulesDto,
|
||||
UpdatePlatformMembershipRoleDto,
|
||||
@@ -73,6 +77,26 @@ export class PlatformController {
|
||||
return this.platform.resetAdminPassword(id, dto);
|
||||
}
|
||||
|
||||
@Patch('admins/:id/profile')
|
||||
updateAdmin(@Param('id') id: string, @Body() dto: UpdatePlatformAdminDto) {
|
||||
return this.platform.updateAdmin(id, dto);
|
||||
}
|
||||
|
||||
@Delete('admins/:id')
|
||||
deleteAdmin(@Param('id') id: string, @CurrentUser() actor: PlatformActor) {
|
||||
return this.platform.deleteAdmin(id, actor.platformAdminId);
|
||||
}
|
||||
|
||||
@Get('master-password')
|
||||
masterPasswordStatus() {
|
||||
return this.platform.masterPasswordStatus();
|
||||
}
|
||||
|
||||
@Put('master-password')
|
||||
setMasterPassword(@Body() dto: SetMasterPasswordDto) {
|
||||
return this.platform.setMasterPassword(dto.password);
|
||||
}
|
||||
|
||||
@Get('organizations')
|
||||
listOrganizations(@Query('q') q?: string) {
|
||||
return this.platform.listOrganizations(q);
|
||||
|
||||
Reference in New Issue
Block a user