13 lines
445 B
TypeScript
13 lines
445 B
TypeScript
import type { LoginByUsernameResponse } from "@/core/auth";
|
|
|
|
/**
|
|
* Agent-level answer scores are an administrative quality-control view.
|
|
* Keep the role check strict so missing, stale or unknown auth roles fail
|
|
* closed instead of exposing aggregate evaluation data.
|
|
*/
|
|
export function canViewAgentFeedbackScore(
|
|
auth: Pick<LoginByUsernameResponse, "system_role"> | null | undefined,
|
|
): boolean {
|
|
return auth?.system_role === "admin";
|
|
}
|