prorm API Reference
    Preparing search index...

    Variable RLSConst

    RLS: {
        init: () => void;
        apply: (Model: any, selector: ScopeSelector) => void;
        remove: (Model: any) => void;
        setContext: (ctx: SecurityContext) => void;
        getContext: () => SecurityContext | undefined;
        clearContext: () => void;
        runInContext: <T>(ctx: SecurityContext, fn: () => T) => T;
        getFilteredQuery: (
            Model: any,
        ) => {
            where?: Record<string, any>;
            include?: any[];
            attributes?: string[];
        };
        registerHooks: (prorm: any) => void;
        middleware: (req: any, res: any, next: () => void) => void;
    } = ...

    Type Declaration

    • init: () => void
    • apply: (Model: any, selector: ScopeSelector) => void
    • remove: (Model: any) => void
    • setContext: (ctx: SecurityContext) => void
    • getContext: () => SecurityContext | undefined
    • clearContext: () => void
    • runInContext: <T>(ctx: SecurityContext, fn: () => T) => T
    • getFilteredQuery: (
          Model: any,
      ) => { where?: Record<string, any>; include?: any[]; attributes?: string[] }
    • registerHooks: (prorm: any) => void
    • middleware: (req: any, res: any, next: () => void) => void