updated login page with qwen
This commit is contained in:
@@ -14,14 +14,6 @@ export class AuthControlGuard implements CanActivate {
|
||||
const req = context.switchToHttp().getRequest();
|
||||
const accessToken = this.cacheService.mergeLoginKey(req);
|
||||
console.log('AuthControlGuard', accessToken);
|
||||
// const hasAccess = accessObject.permissions?.some(
|
||||
// (p: any) => p.method === method && p.url === path,
|
||||
// );
|
||||
|
||||
// if (!hasAccess) {
|
||||
// throw new ForbiddenException('Access denied to this route');
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -32,18 +24,11 @@ export class EndpointControlGuard implements CanActivate {
|
||||
|
||||
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||
const req = context.switchToHttp().getRequest();
|
||||
const selectToken = this.cacheService.mergeSelectKey(req);
|
||||
const method = req.method;
|
||||
const path = req.route?.path;
|
||||
console.log('EndpointControlGuard', selectToken, method, path);
|
||||
// const hasAccess = accessObject.permissions?.some(
|
||||
// (p: any) => p.method === method && p.url === path,
|
||||
// );
|
||||
|
||||
// if (!hasAccess) {
|
||||
// throw new ForbiddenException('Access denied to this route');
|
||||
// }
|
||||
|
||||
// const selectToken = this.cacheService.mergeSelectKey(req);
|
||||
// const method = req.method;
|
||||
// const path = req.route?.path;
|
||||
const accessObject = await this.cacheService.getSelectFromRedis(req);
|
||||
console.log('EndpointControlGuard', accessObject);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user