@takentrade/takentrade-libs
Version:
TakeNTrade shared libraries
21 lines (20 loc) • 674 B
TypeScript
import { CanActivate, ExecutionContext } from '@nestjs/common';
import { Reflector } from '@nestjs/core';
/**
* Role-based authorization guard
* Checks if the authenticated user has the required roles
*/
export declare class RolesGuard implements CanActivate {
private reflector;
/**
* Creates an instance of RolesGuard
* @param reflector - Reflector service for metadata access
*/
constructor(reflector: Reflector);
/**
* Checks if the user has the required roles
* @param context - Execution context
* @returns True if user has required roles, false otherwise
*/
canActivate(context: ExecutionContext): boolean;
}