mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-02-19 01:55:48 -05:00
fix: jwt guard when unauthenticated shares are allowed
This commit is contained in:
parent
e4019612f8
commit
c2b87aba5c
1 changed files with 4 additions and 3 deletions
|
@ -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"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue