fix: faculty users are now recognized as employees
Check Deno code / Check Deno code (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled

This commit is contained in:
2026-05-05 15:29:02 +02:00
parent 0f87bc18c3
commit 49bcc3083a
19 changed files with 62 additions and 58 deletions
+5 -5
View File
@@ -3,16 +3,16 @@ import {
makePartials,
} from "$root/defaults/makePartials.tsx";
import { FreshContext } from "$fresh/server.ts";
import { State } from "$root/defaults/interfaces.ts";
import { isEmployee, State } from "$root/defaults/interfaces.ts";
// deno-lint-ignore require-await
export async function Index(
_request: Request,
context: FreshContext<State>,
) {
const isEmployee =
(context.state as unknown as { session: Record<string, string> }).session
.eduPersonPrimaryAffiliation === "employee";
const employeeCheck = isEmployee(
(context.state as unknown as { session: Record<string, string> }).session,
);
return (
<div class="page-content">
@@ -25,7 +25,7 @@ export async function Index(
</strong>
.
</p>
{isEmployee
{employeeCheck
? (
<p>
Consultez les{" "}