mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 22:11:16 +10:00
* Make JwtGuard better
* Fix auth decorators
This commit is contained in:
@ -24,6 +24,10 @@ export class AuthenticationExtension implements Extension {
|
||||
const userId = jwtPayload.sub;
|
||||
const user = await this.userService.findById(userId);
|
||||
|
||||
if (!user) {
|
||||
throw new UnauthorizedException();
|
||||
}
|
||||
|
||||
//TODO: Check if the page exists and verify user permissions for page.
|
||||
// if all fails, abort connection
|
||||
|
||||
|
||||
Reference in New Issue
Block a user