Class Ability

Hierarchy

  • Ability

Constructors

Properties

permitted: ClaimSet
prohibited: ClaimSet

Accessors

  • get cacheID(): string
  • returns a string with the permitted and prohibited jsons inside, for caching purposes

    Returns string

Methods

  • returns a KeySet describing the access of this ability to the children of the given query: allows on direct descendants, forbids on direct children

    Parameters

    • query: string | IClaimData | Claim

      can be a string ("verb:resource" or "verb:*") or an object with verb and resource

    Returns KeySet<string>

  • return true if permitted is true and prohibited is false

    • permitted -> if the permitted ClaimSet returns true on check() for the given query
    • prohibited -> if the prohibited ClaimSet returns true on check() for the given query

    Parameters

    • query: string | IClaimData | Claim

      can be a string ("verb:resource" or "verb:*") or an object with verb and resource

    Returns boolean

    See

    ClaimSet

  • inverse of can()

    Parameters

    • query: string | IClaimData | Claim

      can be a string ("verb:resource" or "verb:*") or an object with verb and resource

    Returns boolean

    See

    can

  • returns true if there is a prohibited claim that returns true on check()

    Parameters

    • query: string | IClaimData | Claim

      can be a string ("verb:resource" or "verb:*") or an object with verb and resource

    Returns boolean

    See

    • ClaimSet
    • Claim

Generated using TypeDoc