Update role enum and access control Remove isRouteAnAPI(route: string):
boolean Refactor role determination logic to use `eduPersonPrimaryAffiliation` and `amuComposante`. This simplifies checking for Polytech affiliation and identifies roles like professor, administration, and student more accurately. The API access control is updated to reflect the new role names.
This commit is contained in:
@@ -4,7 +4,7 @@ import { AsyncRoute } from "$fresh/src/server/types.ts";
|
||||
export interface AuthenticatedState {
|
||||
isAuthenticated: true;
|
||||
isFromPolytech: boolean;
|
||||
role: "etudiants" | "personnels" | "autres";
|
||||
role: "etudiant" | "professeur" | "administration" | "autre";
|
||||
session: CasContent;
|
||||
availablePages: Record<string, string>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user