diff --git a/src/Middleware/auth/auth.ts b/src/Middleware/auth/auth.ts index 75e20c7..949f8bc 100644 --- a/src/Middleware/auth/auth.ts +++ b/src/Middleware/auth/auth.ts @@ -69,7 +69,7 @@ const _requireAdminAuthentication = if (!token_payload.permission_level || !token_payload.pid || !token_payload.revision) { if (typeof (token_payload as unknown as TeamleaderJWTPayload).team === "string") { - return false; + throw new AuthError("Teamleader authentication is not supported for this operation!"); } throw new AuthError("The token did not include the required information!");