mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-10 20:02:26 +00:00
Return unauthorized if header auth is the only one
This commit is contained in:
@@ -314,6 +314,11 @@ export async function verifyResourceSession(
|
||||
logger.debug("Resource allowed because header auth is valid");
|
||||
return allowed(res);
|
||||
}
|
||||
|
||||
// if there are no other auth methods we need to return unauthorized here
|
||||
if (!sso && !pincode && !password && !resource.emailWhitelistEnabled) {
|
||||
return notAllowed(res);
|
||||
}
|
||||
}
|
||||
|
||||
if (!sessions) {
|
||||
|
||||
Reference in New Issue
Block a user