登录注册:优化协议弹窗与PM后台落点

授权项目负责人登录后,若当前项目具备项目成员、中心管理或审计导出读取权限,优先进入对应管理后台页面,避免仍停留在我的工作台。

抽取登录协议为共享内容模块,注册页新增服务条款和隐私政策弹窗,并在注册成功后展示待管理员审核提示。

补充路由、登录页和注册页静态回归测试,覆盖 PM 管理后台默认落点和协议弹窗行为。
This commit is contained in:
Cheng Zhou
2026-05-13 11:03:46 +08:00
parent 89cecce6b5
commit ab1975d3c6
8 changed files with 392 additions and 57 deletions
+10
View File
@@ -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`");
});
});