mirror of
https://github.com/detleph/server.git
synced 2026-09-04 08:36:06 +02:00
Only throw when the auth is not controlled
This commit is contained in:
@@ -68,7 +68,7 @@ const _requireAdminAuthentication =
|
||||
const token_payload = token_payload_ as AuthJWTPayload;
|
||||
|
||||
if (!token_payload.permission_level || !token_payload.pid || !token_payload.revision) {
|
||||
if (typeof (token_payload as unknown as TeamleaderJWTPayload).team === "string") {
|
||||
if (typeof (token_payload as unknown as TeamleaderJWTPayload).team === "string" && !config.controlled) {
|
||||
throw new AuthError("Teamleader authentication is not supported for this operation!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user