From 28bb4856bee03569153f6471527c9b9f28cb3d14 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 15 Oct 2024 12:03:37 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E8=A7=92=E8=89=B2=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=AE=89=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/controller/sys/authority/user-controller.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ui/certd-server/src/controller/sys/authority/user-controller.ts b/packages/ui/certd-server/src/controller/sys/authority/user-controller.ts index 5d30caa56..048922d56 100644 --- a/packages/ui/certd-server/src/controller/sys/authority/user-controller.ts +++ b/packages/ui/certd-server/src/controller/sys/authority/user-controller.ts @@ -76,7 +76,10 @@ export class UserController extends CrudController { id: number ) { if (id === 1) { - throw new Error('不能删除默认的管理员用户'); + throw new Error('不能删除默认的管理员角色'); + } + if (id === 3) { + throw new Error('不能删除默认的普通用户角色'); } return await super.delete(id); }