diff --git a/api/src/websockets.ts b/api/src/websockets.ts index 7b45016e..bb9327a8 100644 --- a/api/src/websockets.ts +++ b/api/src/websockets.ts @@ -92,7 +92,12 @@ export const appWs = baseWs.ws("/ws", { const handler = actionMap[action as keyof typeof actionMap]; for (const perm of handler.permissions ?? []) { if (!ws.data.jwt.permissions.includes(perm)) { - return ws.close(3000, `Missing permission: '${perm}'.`); + ws.send({ + action: action, + status: 403, + message: `Missing permission: '${perm}'.`, + }); + return; } } await handler.message(ws as any, body as any); diff --git a/front/src/ui/login/form.tsx b/front/src/ui/login/form.tsx index bf447665..f06b7cfd 100644 --- a/front/src/ui/login/form.tsx +++ b/front/src/ui/login/form.tsx @@ -38,7 +38,7 @@ export const FormPage = ({ return (