SAS logoSAS® Mobile Investigator API
    Preparing search index...

    Interface SmiUserApi

    This section of the API relates to information about the current user.

    interface SmiUserApi {
        getDetails(): SmiUserApiDetails;
        hasFeature(name: string): boolean;
    }
    Index

    Methods

    • Method to return the user details.

      Returns SmiUserApiDetails

      A user details object.

      const userDetails = window.sas.smi.user.getDetails();
      console.log(userDetails.userId);
    • Method to return whether or not the user has the supplied feature.

      Parameters

      • name: string

        The feature name. For example: svi.access.mobile

      Returns boolean

      True if the user has the supplied feature, otherwise false.

      const hasFeature = window.sas.smi.user.hasFeature("svi.access.mobile");
      console.log(hasFeature);