登录注册:优化协议弹窗与PM后台落点
授权项目负责人登录后,若当前项目具备项目成员、中心管理或审计导出读取权限,优先进入对应管理后台页面,避免仍停留在我的工作台。 抽取登录协议为共享内容模块,注册页新增服务条款和隐私政策弹窗,并在注册成功后展示待管理员审核提示。 补充路由、登录页和注册页静态回归测试,覆盖 PM 管理后台默认落点和协议弹窗行为。
This commit is contained in:
@@ -14,4 +14,14 @@ describe("admin project route permissions", () => {
|
||||
expect(source).toContain('if (role !== "PM") return false;');
|
||||
expect(source).toContain("roles?.PM?.[permission.module]?.[permission.action]");
|
||||
});
|
||||
|
||||
it("sends authorized project PMs to the management backend after login", () => {
|
||||
const source = readRouter();
|
||||
|
||||
expect(source).toContain("const findPmAdminLandingPath = async");
|
||||
expect(source).toContain("pmAdminLandingModules.find");
|
||||
expect(source).toContain("const pmAdminLanding = isAdmin ? null : await findPmAdminLandingPath()");
|
||||
expect(source).toContain("? pmAdminLanding");
|
||||
expect(source).toContain("`/admin/projects/${studyId}/members`");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user