Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Permissions

Index

Constructors

Properties

value: string[]

The string permission value.

Accessors

  • get ADMIN(): readonly Flags[]
  • get ALLOCATIONS(): readonly Flags[]
  • get BACKUPS(): readonly Flags[]
  • get CONTROL(): readonly Flags[]
  • get DATABASES(): readonly Flags[]
  • get FILES(): readonly Flags[]
  • get SCHEDULES(): readonly Flags[]
  • get SETTINGS(): readonly Flags[]
  • get STARTUPS(): readonly Flags[]
  • get USERS(): readonly Flags[]

Methods

  • hasAll(...perms: string[]): boolean
  • Parameters

    • Rest ...perms: string[]

      The permissions to check for.

    Returns boolean

    True if the current value has all of the specified permissions.

  • hasAny(...perms: string[]): boolean
  • Parameters

    • Rest ...perms: string[]

      The permissions to check for.

    Returns boolean

    True if the current value has any of the specified permissions.

  • isAdmin(): boolean
  • serialize(): Record<string, boolean>
  • Returns Record<string, boolean>

    An object with all the permissions having true or false values if they are currently present.

  • resolve(...perms: string[]): string[]
  • Resolves a permissions object from a specified source.

    Parameters

    • Rest ...perms: string[]

      The permissions to resolve.

    Returns string[]

    The resolved permissions.

Generated using TypeDoc