Documentation
    Preparing search index...

    Interface TwingSandboxSecurityPolicy

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

    Methods

    • Parameters

      • candidate: any
      • method: string

      Returns void

      When the method is not allowed on the passed object

    • 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 { message: string; token: string; type: "function" | "filter" | "tag" } | null