Decorator-style function for common scope checks. Returns a function that can be used in resolvers.
The scope path required
Additional options
A function that performs the scope check
const requireViewRun = RequireScope('view:run');// In resolverasync runView(@Ctx() ctx: AppContext): Promise<ViewResult> { await requireViewRun(ctx); // ... proceed} Copy
const requireViewRun = RequireScope('view:run');// In resolverasync runView(@Ctx() ctx: AppContext): Promise<ViewResult> { await requireViewRun(ctx); // ... proceed}
Decorator-style function for common scope checks. Returns a function that can be used in resolvers.