Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new User(id: string, permission: string, company: string, email: string, activate?: boolean, agency?: string, password?: string): User
  • Parameters

    • id: string
    • permission: string
    • company: string
    • email: string
    • activate: boolean = true
    • agency: string = ''
    • Optional password: string

    Returns User

Properties

Private _activate

_activate: boolean

Private _agency

_agency: string

Private _company

_company: string

Private _email

_email: string

Private _id

_id: string

Private _password

_password: string

Private _permission

_permission: string

Private _salt

_salt: number = ...

Accessors

activate

  • get activate(): boolean

agency

  • get agency(): string

company

  • get company(): string

email

  • get email(): string

id

  • get id(): string

password

  • set password(newPassword: string): void

permission

  • get permission(): string

Methods

hasPermissionFor

  • hasPermissionFor(route: string, method: string): boolean
  • Verifica se o usuário tem permissão para acessar determinada rota

    Parameters

    • route: string

      Rota que se deseja acessar

    • method: string

      Método de acesso à rota

    Returns boolean

toJson

  • toJson(): {}
  • Gera um JSON correspondente ao objeto User sem o atributo password

    Returns {}

    JSON correspondente ao objeto User

    • [key: string]: string | boolean

toJsonSave

  • toJsonSave(): {}
  • Gera um JSON com todos os atributos do objeto

    Returns {}

    JSON correspondente ao objeto User com todos os atributos

    • [key: string]: string | boolean

Generated using TypeDoc