From 803d8b7bfb4e9225c4dbd0251e19c275cc71bab0 Mon Sep 17 00:00:00 2001 From: lik Date: Mon, 25 May 2026 12:30:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=BB=98=E8=AE=A4us?= =?UTF-8?q?er.app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/users.js | 3 ++- models/schema/user.js | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/handler/users.js b/handler/users.js index 571d8e5..a13c7c8 100644 --- a/handler/users.js +++ b/handler/users.js @@ -85,7 +85,8 @@ class HandlerUser { social: { wechat: { openid: openid }, }, - status: { account: "normal", } + status: { account: "normal", }, + app: {}, }; newUser.app[appId] = { role: ["user"], }; diff --git a/models/schema/user.js b/models/schema/user.js index 3c4e709..2ed57b2 100644 --- a/models/schema/user.js +++ b/models/schema/user.js @@ -68,13 +68,6 @@ const UserSchema = mongoose.Schema( }, app: { - admin: { - role: [{ type: String, enum: ["admin"], comment: '用户在admin应用中的权限' }], - }, - // 中医相关信息 - 用户在中医系统中的角色和权限 - attendant: { - role: [{ type: String, enum: ["admin", "attendant", "patient"], comment: '用户在attendant应用中的权限' }], - }, }, // 元数据 - 系统管理信息