mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-20 02:22:17 +00:00
19 lines
407 B
TypeScript
19 lines
407 B
TypeScript
|
/*
|
||
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||
|
*
|
||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||
|
*/
|
||
|
|
||
|
import { ExecutionContext, Injectable } from '@nestjs/common';
|
||
|
|
||
|
@Injectable()
|
||
|
export class MockAuthGuard {
|
||
|
canActivate(context: ExecutionContext) {
|
||
|
const req = context.switchToHttp().getRequest();
|
||
|
req.user = {
|
||
|
userName: 'hardcoded',
|
||
|
};
|
||
|
return true;
|
||
|
}
|
||
|
}
|