mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-17 12:43:13 +02:00
fix: jwt guard when unauthenticated shares are allowed
This commit is contained in:
@@ -9,8 +9,9 @@ export class JwtGuard extends AuthGuard("jwt") {
|
|||||||
canActivate(
|
canActivate(
|
||||||
context: ExecutionContext
|
context: ExecutionContext
|
||||||
): boolean | Promise<boolean> | Observable<boolean> {
|
): boolean | Promise<boolean> | Observable<boolean> {
|
||||||
return process.env.ALLOW_UNAUTHENTICATED_SHARES == "true"
|
return (
|
||||||
? true
|
super.canActivate(context) ||
|
||||||
: super.canActivate(context);
|
process.env.ALLOW_UNAUTHENTICATED_SHARES == "true"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user