Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface User

An user.

Hierarchy

  • User

Implemented by

Index

Properties

account

account: Account

Gets the underlying account.

can

can: function

Checks if this user is able to do something.

param

The name of the (ACL) resource.

returns

Is able to do or not.

Type declaration

    • (acl: string, defaultValue?: boolean): boolean
    • Parameters

      • acl: string
      • Optional defaultValue: boolean

      Returns boolean

context

Gets the underlying request context.

has

has: function

Checks if a variable exists.

param

The name of the variable.

returns

Exists or not.

Type declaration

    • (name: string): boolean
    • Parameters

      • name: string

      Returns boolean

isDirVisible

isDirVisible: function

Checks if a directory is visible for that user.

param

The file to check.

param

Default value that indicates if directories with loading dots are allowed or not.

returns

The promise.

Type declaration

    • (dir: string, withDot: boolean): PromiseLike<boolean>
    • Parameters

      • dir: string
      • withDot: boolean

      Returns PromiseLike<boolean>

isFileVisible

isFileVisible: function

Checks if a file is visible for that user.

param

The file to check.

param

Default value that indicates if directories with loading dots are allowed or not.

returns

The promise.

Type declaration

    • (file: string, withDot: boolean): PromiseLike<boolean>
    • Parameters

      • file: string
      • withDot: boolean

      Returns PromiseLike<boolean>

isGuest

isGuest: boolean

Gets if user is a guest or not.

unset

unset: function

Removes a variable.

param

The name of the variable.

chainable

Type declaration

    • (name: string): User
    • Parameters

      • name: string

      Returns User

Methods

get

  • get<T>(name: string, defaultValue?: T): T
  • Gets a variable of the user.

    Type parameters

    • T

    Parameters

    • name: string

      The name of the variable.

    • Optional defaultValue: T

    Returns T

    The value.

set

  • set<T>(name: string, value: T): User
  • Sets a variable for the user.

    chainable

    Type parameters

    • T

    Parameters

    • name: string

      The name of the variable.

    • value: T

      The value to set.

    Returns User

Generated using TypeDoc