Classes
Methods
# async getCurrentUserData() → {Promise.<ApiResponse>}
Get current user's data from IDP# including last chosen role
Promise.<ApiResponse>
# async getCurrentUserLicences() → {Promise.<ApiResponse>}
Get licences of current user current user will be determined by context
User
Promise.<ApiResponse>
# async getCurrentUserScopes() → {Promise.<{status: number, data: any}>}
Internal: fetch role ids for a user. Get scopes of current user will be determined by context
Promise.<{status: number, data: any}>
# async getGroupsOfUser(userid, projectList, catalogueList, globalGroups) → {Promise.<ApiResponse>}
Get groups in which user 'userid' is contained.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
userid |
string
|
||
projectList |
*
|
||
catalogueList |
*
|
||
globalGroups |
*
|
false |
Promise.<ApiResponse>
Example
{
'status' : 200
'data' : {
'projectgroups' : [],
'cataloguegroups' : [],
'globalgroups' : []
}
}
# async getProjectsOfCurrentUser(queryopt) → {Promise.<ApiResponse>}
Get projects of the currently logged in user.
The function uses the token stored in the context object.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
query |
object
|
<optional> |
Query object |
|
members |
Array.<string>
|
<optional> |
['info'] | |
filter |
string
|
<optional> |
'' |
- Since:
- 10.2025, aab
ApiResponse with list of json objects :
Promise.<ApiResponse>
# async getUserAvatar(userid) → {Promise.<{status: number, data: any}>}
Get avatar of a user
Parameters:
| Name | Type | Description |
|---|---|---|
userid |
string
|
The user ID |
Promise.<{status: number, data: any}>
# async getUsers(userids, projectidopt, catalogueidopt, globalGroupsopt, userRolesopt, withInfoopt) → {Promise.<ApiResponse>}
Build user aggregates, optionally including groups, roles, and contact info.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
userids |
Array.<string>
|
Array of user IDs |
||
projectid |
string
|
<optional> |
Project ID |
|
catalogueid |
string
|
<optional> |
Catalogue ID |
|
globalGroups |
boolean
|
<optional> |
false | Include global groups |
userRoles |
boolean
|
<optional> |
false | Include user roles |
withInfo |
boolean
|
<optional> |
false | Include user contact info |
- The response object
Promise.<ApiResponse>
# async updateCurrentUserData(data) → {Promise.<ApiResponse>}
Update current user's data to IDP
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
data |
object
|
The user data |
|
name |
string
|
<optional> |
The name |
roleid |
string
|
<optional> |
The role ID |
Promise.<ApiResponse>