import { Injectable, ExecutionContext } from '@nestjs/common'; import { Observable } from 'rxjs'; import { JWTGuard } from './jwt.guard'; @Injectable() export class RolesGuard extends JWTGuard { canActivate( context: ExecutionContext, ): boolean | Promise | Observable { super.canActivate(context); /** * Create function to check if `this.userSession` have access * to Read / Create / Update / and Other Action */ /** * Assign rules to session, So Query can take the rules and give * the data base on user request */ return true; } }