alfresco-ng2-components/docs/core/services/identity-user.service.md
Maurizio Vitale 1fa81962a0
👽 Angular 14 rebase 👽 (#7769)
* fix after rebase

* new release strategy for ng next

Signed-off-by: eromano <eugenioromano16@gmail.com>

* peer dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

* Angular 14

fix unit test and storybook

Signed-off-by: eromano <eugenioromano16@gmail.com>

fix after rebase

Signed-off-by: eromano <eugenioromano16@gmail.com>

update pkg.json

Signed-off-by: eromano <eugenioromano16@gmail.com>

missing dep

Signed-off-by: eromano <eugenioromano16@gmail.com>

Fix mistake and missing code

Dream....build only affected libs

Add utility run commands

* Use nx command to run affected tests

* Fix nx test core

fix content tests

Run unit with watch false

core test fixes

reduce test warnings

Fix process cloud unit

Fix adf unit test

Fix lint process cloud

Disable lint next line

Use right core path

Fix insights unit

fix linting insights

Fix process-services unit

fix the extensions test report

fix test warnings

Fix content unit

Fix bunch of content unit

* Produce an adf alpha of 14

* hopefully fixing the content

* Push back the npm publish

* Remove flaky unit

* Fix linting

* Make the branch as root

* Get rid of angualar13

* Remove the travis depth

* Fixing version for npm

* Enabling cache for unit and build

* Fix scss for core and paths

Copy i18 and asset by using ng-packager

Export the theming alias and fix path

Use ng-package to copy assets process-services-cloud

Use ng-package to copy assets process-services

Use ng-package to copy assets content-services

Use ng-package to copy assets insights

* feat: fix api secondary entry point

* fix storybook rebase

* Move dist under dist/libs from lib/dist

* Fix the webstyle

* Use only necessary nrwl deps and improve lint

* Fix unit for libs

* Convert lint.sh to targets - improve performance

* Use latest of angular

* Align alfresco-js-api

Signed-off-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: eromano <eugenioromano16@gmail.com>
Co-authored-by: Mikolaj Serwicki <mikolaj.serwicki@hyland.com>
Co-authored-by: Tomasz <tomasz.gnyp@hyland.com>
2022-08-25 10:50:30 +01: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