diff --git a/src/utils/permission.ts b/src/utils/permission.ts index fcba349..4324d98 100644 --- a/src/utils/permission.ts +++ b/src/utils/permission.ts @@ -66,21 +66,6 @@ export function hasAnyRole(value: string | string[]): boolean { return arrayHasAny(userStore?.roles, value); } -/** 学生角色标识 */ -export const STUDENT_ROLE_CODE = 'student'; - -/** - * 是否仅为学生身份(角色恰好只有 student) - * - * 与后端 BaseController#hasOnlyStudentRole 保持一致:拥有任意其他角色 - * (学生干部、教师、管理员等)即视为非纯学生,不在此列。 - */ -export function isOnlyStudent(): boolean { - const userStore = useUserStore(); - const roles = (userStore?.roles ?? []).filter((d) => !!d); - return roles.length === 1 && roles[0] === STUDENT_ROLE_CODE; -} - /** * 是否有某些权限 * @param value 权限字符或字符数组 diff --git a/src/views/oa/chatgpt/index.vue b/src/views/oa/chatgpt/index.vue index 55adc99..668c5b9 100644 --- a/src/views/oa/chatgpt/index.vue +++ b/src/views/oa/chatgpt/index.vue @@ -80,7 +80,6 @@
{{ userName }}