mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
* fix conflicts * [ADF-4048] - fix add same user on multiple selection * [ADF-4048] PeopleCloudComponent change validation users functionality * [ADF-4048] PeopleCloudComponent - focus input when preselected user exists * [ADF-4048] PeopleCloudComponent - pull request changes * [ADF-4048] - lint * [ADF-4048] PeopleCloud - PR changes * [ADF-4048] - fix conflicts * [ADF-4048] fx lint
8.1 KiB
8.1 KiB
Title, Added, Status, Last reviewed
Title | Added | Status | Last reviewed |
---|---|---|---|
Identity user service | v3.0.0 | Active | 2019-02-08 |
Identity user service
Gets OAuth2 personal details and roles for users.
Class members
Methods
- 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:
- findUserByEmail(email:
string
):Observable
<any>
Find users based on email input.- email:
string
- Search query string - Returns
Observable
<any>
- 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
<any>
Find users based on username input.- username:
string
- Search query string - Returns
Observable
<any>
- List of users
- username:
- findUsersByName(search:
string
):Observable
<any>
Find users based on search input.- search:
string
- Search query string - Returns
Observable
<any>
- List of users
- search:
- 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
- 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:
- getValueFromToken(key:
string
)
Gets a named value from the user access token.- key:
string
- Key name of the field to retrieve
- key:
Details
OAuth2 defines an access token (used when authenticating a user) and a number of authentication roles that the user can participate in (see this page for an introduction to OAuth2 and a description of the roles). You can use the Identity user service to access this information for users, including the current user.