This API is used to get the details and functionality associated with the current user.

Accessed from the window at window.sas.vi.currentUser.

window.sas.vi.currentUser.getSessionDetails();
interface CurrentUserApi {
    getSessionDetails(): SessionDetails;
    getUserDetails(): Promise<UserSummary>;
    getUserMemberships(limit?: number): Promise<IdentityFlatMembership[]>;
    hasAdminFeatures(): boolean;
    hasFeatures(features: string[]): boolean;
}

Methods

  • Returns SessionDetails

    The user's current session details.

    Gets the object containing the users current session details.

  • Returns Promise<UserSummary>

    The current user details.

    Gets the object containing the current user details.

  • Parameters

    • Optionallimit: number

      Maximum number of groups to be returned. Default: 1000.

    Returns Promise<IdentityFlatMembership[]>

    A list of group details.

    Gets the list of groups to which the current user belongs.

  • Returns boolean

    A boolean value indicating if the user has access to the administration features.

    Verifies if the current user has administration features.

  • Parameters

    • features: string[]

      {string[]} Identifiers of the required features.

    Returns boolean

    A boolean value indicating if the user has access to the features.

    Verifies if the current user has a set of features.