Type parameters

Hierarchy

Properties

Readonly code

code: string

App code of the URL’s target (the app’s code).

Readonly id

id: string

ID of the URL’s target.

Readonly namespace

namespace: string

Namespace of the URL target (the code of the workspace that the app belongs to).

Methods

block

  • block(): Promise<void>
  • The method locks a user’s account.

    await Context.data.user.block();
    

    Returns Promise<void>

fetch

getChiefs

  • The method retrieves all superiors of a user.

    This method defines all the superiors of a user based on the organizational chart. The first position above the user’s position in the organizational chart tree will be considered the user’s superior. If the user does not have a position in the org chart, the method will return an empty list. If the user is in the root of the org chart tree, the method will return this user.

    const chiefs = await Context.data.__createdBy.getChiefs();
    Context.data.approver = chiefs[0]; 
    

    Returns Promise<UserItemRef[]>

unblock

  • unblock(): Promise<void>
  • The method unlocks a user’s account.

    await Context.data.user.unblock();
    

    Returns Promise<void>