diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c908af7..7d162aa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ vNext Release notes (TBD) ### Enhancements * Add support for Linking Objects (AKA Backlinks). +* Add support for retrieving user account information. ### Bug fixes * Node diff --git a/docs/sync.js b/docs/sync.js index ed6006f1..f8e1ae11 100644 --- a/docs/sync.js +++ b/docs/sync.js @@ -225,6 +225,23 @@ class User { * @returns {Realm} */ openManagementRealm() {} + + /** + * Get account information for a user. (requires administrator privilidges) + * @param {string} provider - the provider to query for user account information (ex. 'password') + * @param {string} username - the target username which account information should be retrieved + * @returns - json object for the retrieved account information + * @example + * { + * "provider_id": "user@email.co", + * "provider": "password", + * "user": { + * "id": "06ac9a0a-a96a-4ee1-b53c-b05a7542035a", + * "isAdmin": true, + * } + * } + */ + retrieveAccount() {provider, username} } /** diff --git a/tests/js/admin-user-helper.js b/tests/js/admin-user-helper.js index 99bd4d4e..a9d17e8c 100644 --- a/tests/js/admin-user-helper.js +++ b/tests/js/admin-user-helper.js @@ -58,9 +58,7 @@ exports.createAdminUser = function () { let isAdmin = newAdminUser.isAdmin; user.logout(); if (!isAdmin) { - setTimeout(() => { - waitForServerToUpdateAdminUser(); - }, 500); + setTimeout(waitForServerToUpdateAdminUser, 500); return; }