审计日志并入系统管理、规范项目成员获取逻辑

This commit is contained in:
Cheng Zhou
2025-12-26 14:57:57 +08:00
parent 7c9befc3c9
commit 71db309e12
17 changed files with 94 additions and 116 deletions
+3 -4
View File
@@ -151,13 +151,12 @@ const eventTypeOptions = Object.entries(auditDict).map(([value, cfg]) => ({
}));
const userOptions = computed(() => users.value.map((u: any) => ({ label: u.username, value: u.id })));
const isAdmin = computed(() => auth.user?.role === "ADMIN");
const canProjectExport = computed(() => !!study.currentStudy && (auth.user?.role === "ADMIN" || auth.user?.role === "PM" || study.currentStudyRole === "PM"));
const canProjectExport = computed(() => !!study.currentStudy && auth.user?.role === "ADMIN");
const ensureAccess = () => {
const role = auth.user?.role;
const studyRole = study.currentStudyRole;
if (!(role === "ADMIN" || role === "PM" || studyRole === "PM")) {
router.replace("/study/home");
if (role !== "ADMIN") {
router.replace("/admin/users");
}
};