async impersonateAsync(username) {
        throwIf(
            !this.canAuthUserImpersonate,
            'User does not have right to impersonate or impersonation is disabled.'
        );
        return XH.fetchJson({
            url: 'xh/impersonate',
            params: {
                username: username
            }
        }).then(() => {
            XH.reloadApp();
        });
    }
/**
     * Begin an impersonation session to act as another user. The UI server will allow this only
     * if the actual authenticated user has the HOIST_ADMIN role, and is attempting to impersonate
     * a known user who has permission to and has accessed the app themselves. If successful,
     * the application will reload and the admin will now be acting as the other user.
     *
     * @param {string} username - the end-user to impersonate
     */
Begin an impersonation session to act as another user. The UI server will allow this only
if the actual authenticated user has the HOIST_ADMIN role, and is attempting to impersonate
a known user who has permission to and has accessed the app themselves. If successful,
the application will reload and the admin will now be acting as the other user.

@param {string} username - the end-user to impersonate
Begin an impersonation session to act as another user . The UI server will allow this only if the actual authenticated user has the HOIST_ADMIN role and is attempting to impersonate a known user who has permission to and has accessed the app themselves . If successful the application will reload and the admin will now be acting as the other user . @param { string } username - the end - user to impersonate
async impersonateAsync(username) {
        throwIf(
            !this.canAuthUserImpersonate,
            'User does not have right to impersonate or impersonation is disabled.'
        );
        return XH.fetchJson({
            url: 'xh/impersonate',
            params: {
                username: username
            }
        }).then(() => {
            XH.reloadApp();
        });
    }
async impersonateAsync ( username ) { throwIf ( ! this . canAuthUserImpersonate , 'User does not have right to impersonate or impersonation is disabled.' ) ; return XH . fetchJson ( { url : 'xh/impersonate' , params : { username : username } } ) . then ( ( ) => { XH . reloadApp ( ) ; } ) ; }
Begin an impersonation session to act as another user.
Begin an impersonation session to act as another user .