Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Roles

Hierarchy

Index

Constructors

constructor

  • new Roles(allowed_roles: string[]): Roles
  • Parameters

    • allowed_roles: string[]

    Returns Roles

Properties

allowed_roles

allowed_roles: string[]

params

params: any

Static type_name

type_name: string = "roles"

Methods

_getRestrictingQuery

check

checkerFunction

  • checkerFunction(context: Context): Promise<{ allowed: boolean; reason: string }>
  • Parameters

    Returns Promise<{ allowed: boolean; reason: string }>

countMatchingRoles

  • countMatchingRoles(context: Context): Promise<number>
  • Parameters

    Returns Promise<number>

getRestrictingQuery

isItemSensitive

  • isItemSensitive(): Promise<boolean>

Static allow

  • allow(reason: string): { allowed: boolean; reason: string }
  • Parameters

    • reason: string

    Returns { allowed: boolean; reason: string }

    • allowed: boolean
    • reason: string

Static deny

  • deny(reason: string): { allowed: boolean; reason: string }
  • Parameters

    • reason: string

    Returns { allowed: boolean; reason: string }

    • allowed: boolean
    • reason: string

Static fromDefinition

Generated using TypeDoc