alfresco-ng2-components/docs/core/services/identity-user.service.md
Eugenio Romano c3452a4f62
Documentation build (#6762)
* move doc dependency in doctools

* add ignore link

* rebuild doc

* version index

* put it back some deps
2021-03-03 14:08:15 +00:00

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.
  • changePassword(userId: string, newPassword: IdentityUserPasswordModel): Observable<any>
    Changes user password.
  • 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
  • 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
  • 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
  • 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
  • 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
  • createUser(newUser: IdentityUserModel): Observable<any>
    Creates new user.
  • deleteUser(userId: string): Observable<any>
    Deletes User.
    • userId: string - Id of the user.
    • Returns Observable<any> - Empty response when the user deleted.
  • findUserByEmail(email: string): Observable<IdentityUserModel[]>
    Find users based on email input.
  • findUserById(id: string): Observable<any>
    Find users based on id input.
    • id: string - Search query string
    • Returns Observable<any> - users object
  • findUserByUsername(username: string): Observable<IdentityUserModel[]>
    Find users based on username input.
  • findUsersByName(search: string): Observable<IdentityUserModel[]>
    Find users based on search input.
  • getAssignedRoles(userId: string): Observable<IdentityRoleModel[]>
    Gets assigned roles.
  • getAvailableRoles(userId: string): Observable<IdentityRoleModel[]>
    Gets available roles
  • getClientIdByApplicationName(applicationName: string): Observable<string>
    Gets the client ID for an application.
    • applicationName: string - Name of the application
    • Returns Observable<string> - Client ID string
  • 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
  • getCurrentUserInfo(): IdentityUserModel
    Gets the name and other basic details of the current user.
  • getEffectiveRoles(userId: string): Observable<IdentityRoleModel[]>
    Gets effective roles.
  • getInvolvedGroups(userId: string): Observable<IdentityGroupModel[]>
    Gets involved groups.
  • getTotalUsersCount(): Observable<number>
    Gets users total count.
    • Returns Observable<number> - Number of users count.
  • getUserRoles(userId: string): Observable<IdentityRoleModel[]>
    Gets a list of roles for a user.
  • getUsers(): Observable<IdentityUserModel[]>
    Gets details for all users.
  • 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
  • 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
  • joinGroup(joinGroupRequest: IdentityJoinGroupRequestModel): Observable<any>
    Joins group.
  • 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.
  • queryUsers(requestQuery: IdentityUserQueryCloudRequestModel): Observable<IdentityUserQueryResponse>
    Gets details for all users.
  • removeRoles(userId: string, removedRoles: IdentityRoleModel[]): Observable<any>
    Removes assigned roles.
  • 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.

See also