refactor(app): appId wxapp-escort-admin 更名为 wxapp_companion
与陪诊师小程序工程名对齐;同步注册表、配置白名单、脚本示例与测试。数据库 user_app / user_identity / user.app 旧字段已同步迁移。
This commit is contained in:
@@ -6,7 +6,7 @@ import { APP } from '../app.js';
|
||||
import { DBModel } from '../models/index.js';
|
||||
import { hashToken } from '../utils/crypto.js';
|
||||
|
||||
const ADMIN_APP = 'wxapp-escort-admin';
|
||||
const ADMIN_APP = 'wxapp_companion';
|
||||
const WEB_ADMIN_APP = 'web-escort-admin';
|
||||
const CONSUMER_APP = 'wxapp-escort';
|
||||
|
||||
@@ -135,7 +135,7 @@ describe('管理端权限', () => {
|
||||
|
||||
it('A 应用 user + B 应用 admin:按应用逐条判角色,必须放行', async () => {
|
||||
// 典型画像:先登录小程序管理端(自动 ["user"]),后被授予 Web 后台 ["admin"]。
|
||||
// wxapp-escort-admin 排序在 web-escort-admin 之前,只取第一条判角色会误拒。
|
||||
// wxapp_companion 排序在 web-escort-admin 之前,只取第一条判角色会误拒。
|
||||
const mixed = await createUser(nextMobile(), '混合角色管理员');
|
||||
await addMembership(mixed.user._id, ADMIN_APP, ['user']);
|
||||
await addMembership(mixed.user._id, WEB_ADMIN_APP, ['admin']);
|
||||
|
||||
Reference in New Issue
Block a user