Interface TwingSandboxSecurityPolicy

interface TwingSandboxSecurityPolicy {
    checkMethodAllowed(candidate: any, method: string): void;
    checkPropertyAllowed(candidate: any, property: string): void;
    checkSecurity(tags: string[], filters: string[], functions: string[]): null | {
        message: string;
        token: string;
        type: "function" | "filter" | "tag";
    };
}

Methods

  • Parameters

    • candidate: any
    • property: string

    Returns void

    TwingSandboxSecurityNotAllowedPropertyError When the property is not allowed on the passed object

  • Parameters

    • tags: string[]
    • filters: string[]
    • functions: string[]

    Returns null | {
        message: string;
        token: string;
        type: "function" | "filter" | "tag";
    }