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