backend has an endpoint for verifying a user role and representation id:
GET /access/sessions/{session_id}/me
It returns:
{
"role": "chair",
"representation_id": null
}
which uses the user's JWT access token to verify it's identity.
Frontend can use this endpoint to store this info somewhere. Codex suggested using a session-scoped variable that fetches this variable once, and components read a shared source (like useSessionAccess or similar). Current isChair implementation on frontend can be kept, it's good for what we're doing (client side rendering)
backend has an endpoint for verifying a user role and representation id:
GET /access/sessions/{session_id}/me
It returns:
{
"role": "chair",
"representation_id": null
}
which uses the user's JWT access token to verify it's identity.
Frontend can use this endpoint to store this info somewhere. Codex suggested using a session-scoped variable that fetches this variable once, and components read a shared source (like useSessionAccess or similar). Current isChair implementation on frontend can be kept, it's good for what we're doing (client side rendering)