mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-04-23 22:30:37 +00:00
14 KiB
14 KiB
Title, Added, Status, Last reviewed
| Title | Added | Status | Last reviewed |
|---|---|---|---|
| Identity user service | v3.0.0 | Active | 2019-07-12 |
Identity user service
Gets OAuth2 personal details and roles for users and performs CRUD operations on identity users.
Class members
Methods
- assignRoles(userId:
string, roles:IdentityRoleModel[]):Observable<any>
Assigns roles to the user.- userId:
string- Id of the user. - roles:
IdentityRoleModel[]- Array of roles. - Returns
Observable<any>- Empty response when the role assigned.
- userId:
- changePassword(userId:
string, newPassword:IdentityUserPasswordModel):Observable<any>
Changes user password.- userId:
string- Id of the user. - newPassword:
IdentityUserPasswordModel- - Returns
Observable<any>- Empty response when the password changed.
- userId:
- checkUserHasAnyApplicationRole(userId:
string, applicationName:string, roleNames:string[]):Observable<boolean>
Checks if a user has any application role.- userId:
string- ID of the target user - applicationName:
string- Name of the application - roleNames:
string[]- List of role names to check for - Returns
Observable<boolean>- True if the user has one or more of the roles, false otherwise
- userId:
- checkUserHasAnyClientAppRole(userId:
string, clientId:string, roleNames:string[]):Observable<boolean>
Checks whether a user has any of the client app roles.- userId:
string- ID of the target user - clientId:
string- ID of the client app - roleNames:
string[]- List of role names to check for - Returns
Observable<boolean>- True if the user has one or more of the roles, false otherwise
- userId:
- checkUserHasApplicationAccess(userId:
string, applicationName:string):Observable<boolean>
Checks if a user has access to an application.- userId:
string- ID of the user - applicationName:
string- Name of the application - Returns
Observable<boolean>- True if the user has access, false otherwise
- userId:
- checkUserHasClientApp(userId:
string, clientId:string):Observable<boolean>
Checks whether user has access to a client app.- userId:
string- ID of the target user - clientId:
string- ID of the client app - Returns
Observable<boolean>- True if the user has access, false otherwise
- userId:
- checkUserHasRole(userId:
string, roleNames:string[]):Observable<boolean>
Checks if a user has one of the roles from a list.- userId:
string- ID of the target user - roleNames:
string[]- Array of roles to check for - Returns
Observable<boolean>- True if the user has one of the roles, false otherwise
- userId:
- createUser(newUser:
IdentityUserModel):Observable<any>
Creates new user.- newUser:
IdentityUserModel- Object containing the new user details. - Returns
Observable<any>- Empty response when the user created.
- newUser:
- deleteUser(userId:
string):Observable<any>
Deletes User.- userId:
string- Id of the user. - Returns
Observable<any>- Empty response when the user deleted.
- userId:
- findUserByEmail(email:
string):Observable<IdentityUserModel[]>
Find users based on email input.- email:
string- Search query string - Returns
Observable<IdentityUserModel[]>- List of users
- email:
- findUserById(id:
string):Observable<any>
Find users based on id input.- id:
string- Search query string - Returns
Observable<any>- users object
- id:
- findUserByUsername(username:
string):Observable<IdentityUserModel[]>
Find users based on username input.- username:
string- Search query string - Returns
Observable<IdentityUserModel[]>- List of users
- username:
- findUsersByName(search:
string):Observable<IdentityUserModel[]>
Find users based on search input.- search:
string- Search query string - Returns
Observable<IdentityUserModel[]>- List of users
- search:
- getAssignedRoles(userId:
string):Observable<IdentityRoleModel[]>
Gets assigned roles.- userId:
string- Id of the user. - Returns
Observable<IdentityRoleModel[]>- Array of assigned roles information objects
- userId:
- getAvailableRoles(userId:
string):Observable<IdentityRoleModel[]>
Gets available roles- userId:
string- Id of the user. - Returns
Observable<IdentityRoleModel[]>- Array of available roles information objects
- userId:
- getClientIdByApplicationName(applicationName:
string):Observable<string>
Gets the client ID for an application.- applicationName:
string- Name of the application - Returns
Observable<string>- Client ID string
- applicationName:
- getClientRoles(userId:
string, clientId:string):Observable<any[]>
Get client roles of a user for a particular client.- userId:
string- ID of the target user - clientId:
string- ID of the client app - Returns
Observable<any[]>- List of client roles
- userId:
- getCurrentUserInfo():
IdentityUserModel
Gets the name and other basic details of the current user.- Returns
IdentityUserModel- The user's details
- Returns
- getEffectiveRoles(userId:
string):Observable<IdentityRoleModel[]>
Gets effective roles.- userId:
string- Id of the user. - Returns
Observable<IdentityRoleModel[]>- Array of composite roles information objects
- userId:
- getInvolvedGroups(userId:
string):Observable<IdentityGroupModel[]>
Gets involved groups.- userId:
string- Id of the user. - Returns
Observable<IdentityGroupModel[]>- Array of involved groups information objects.
- userId:
- getTotalUsersCount():
Observable<number>
Gets users total count.- Returns
Observable<number>- Number of users count.
- Returns
- getUserRoles(userId:
string):Observable<IdentityRoleModel[]>
Gets a list of roles for a user.- userId:
string- ID of the user - Returns
Observable<IdentityRoleModel[]>- Array of role info objects
- userId:
- getUsers():
Observable<IdentityUserModel[]>
Gets details for all users.- Returns
Observable<IdentityUserModel[]>- Array of user info objects
- Returns
- getUsersByRolesWithCurrentUser(roleNames:
string[]):Promise<IdentityUserModel[]>
Gets an array of users (including the current user) who have any of the roles in the supplied list.- roleNames:
string[]- List of role names to look for - Returns
Promise<IdentityUserModel[]>- Array of user info objects
- roleNames:
- getUsersByRolesWithoutCurrentUser(roleNames:
string[]):Promise<IdentityUserModel[]>
Gets an array of users (not including the current user) who have any of the roles in the supplied list.- roleNames:
string[]- List of role names to look for - Returns
Promise<IdentityUserModel[]>- Array of user info objects
- roleNames:
- joinGroup(joinGroupRequest:
IdentityJoinGroupRequestModel):Observable<any>
Joins group.- joinGroupRequest:
IdentityJoinGroupRequestModel- Details of join group request (IdentityJoinGroupRequestModel). - Returns
Observable<any>- Empty response when the user joined the group.
- joinGroupRequest:
- leaveGroup(userId:
any, groupId:string):Observable<any>
Leaves group.- userId:
any- Id of the user. - groupId:
string- Id of the group. - Returns
Observable<any>- Empty response when the user left the group.
- userId:
- queryUsers(requestQuery:
IdentityUserQueryCloudRequestModel):Observable<IdentityUserQueryResponse>
Gets details for all users.- requestQuery:
IdentityUserQueryCloudRequestModel- - Returns
Observable<IdentityUserQueryResponse>- Array of user information objects.
- requestQuery:
- removeRoles(userId:
string, removedRoles:IdentityRoleModel[]):Observable<any>
Removes assigned roles.- userId:
string- Id of the user. - removedRoles:
IdentityRoleModel[]- - Returns
Observable<any>- Empty response when the role removed.
- userId:
- updateUser(userId:
string, updatedUser:IdentityUserModel):Observable<any>
Updates user details.- userId:
string- Id of the user. - updatedUser:
IdentityUserModel- Object containing the user details. - Returns
Observable<any>- Empty response when the user updated.
- userId: