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应用中的权限' }], - }, }, // 元数据 - 系统管理信息