审计日志并入系统管理、规范项目成员获取逻辑
This commit is contained in:
@@ -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");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user