Skip to content

Commit 81f93bb

Browse files
committed
add userInfo
1 parent 1e3d865 commit 81f93bb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lib/accessControl.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,4 +968,21 @@ AccessControl.prototype.deleteAccessRequest = function (acceId, orgName) {
968968
const org = orgName || this.defaultOrganization;
969969
return this.dispatch(`${this.baseURL}/organizations/${UTILS.encodeURISegment(org)}/access_requests/${acceId}`, CONST.DELETE);
970970
};
971+
972+
/**
973+
* -- TerminusX API --
974+
* Get the userinfo teams ownership and subscription
975+
* @param {string} [orgName] - The organization name.
976+
* @return {Promise} A promise that returns the call response object, or an Error if rejected.
977+
* @example
978+
* accessControl.getUserInfo().then(result=>{
979+
* console.log(result)
980+
* })
981+
*
982+
*/
983+
AccessControl.prototype.getUserInfo = function (userName) {
984+
const userNameUrl = userName || 'info';
985+
return this.dispatch(`${this.baseURL}/users/${UTILS.encodeURISegment(userNameUrl)}`, CONST.GET);
986+
};
987+
971988
module.exports = AccessControl;

0 commit comments

Comments
 (0)