feat(rbac): add user-ding-mapping CRUD endpoints
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
UpdateUserDto,
|
||||
ResetPasswordDto,
|
||||
UpdateProfileDto,
|
||||
CreateUserDingMappingDto,
|
||||
} from './dto/rbac.dto';
|
||||
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
||||
import { RequirePermission } from '../auth/decorators/permission.decorator';
|
||||
@@ -298,6 +299,32 @@ export class RbacController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ---- 钉钉用户绑定 ----
|
||||
|
||||
@Get('user-ding-mappings')
|
||||
@RequirePermission('user:view')
|
||||
async getUserDingMappings() {
|
||||
return this.rbacService.getUserDingMappings();
|
||||
}
|
||||
|
||||
@Get('user-ding-mappings/unbound-users')
|
||||
@RequirePermission('user:view')
|
||||
async getUnboundUsers() {
|
||||
return this.rbacService.getUnboundUsers();
|
||||
}
|
||||
|
||||
@Post('user-ding-mappings')
|
||||
@RequirePermission('user:edit')
|
||||
async createUserDingMapping(@Body() dto: CreateUserDingMappingDto) {
|
||||
return this.rbacService.createUserDingMapping(dto);
|
||||
}
|
||||
|
||||
@Delete('user-ding-mappings/:id')
|
||||
@RequirePermission('user:delete')
|
||||
async deleteUserDingMapping(@Param('id') id: string) {
|
||||
return this.rbacService.deleteUserDingMapping(+id);
|
||||
}
|
||||
// ---- 教师工作台 ----
|
||||
|
||||
@Get('teacher-workspace')
|
||||
|
||||
Reference in New Issue
Block a user