mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-24 14:31:41 +00:00
* [AAE-8748] - Auth guards call api when access is not in JWT * [ci:force] fix unit tests * Remove fdescribe * Add documentation and unit tests for the user access service * Rename mocks, make e2e independent * Fix login e2e * Move forbidden access e2e under cloud
1.1 KiB
1.1 KiB
Title, Added, Status, Last reviewed
Title | Added | Status | Last reviewed |
---|---|---|---|
User access service | v1.0.0 | Active | 2022-06-05 |
User access service
Checks the global and application access of a user
Class members
Methods
- fetchUserAccess()
Fetches the global and application access of the user - hasApplicationAccess(appName:
string
, rolesToCheck: string[]):boolean
Checks if the user has at least one of the roles to check for a given app.- appName:
string
- The name of the app - rolesToCheck:
string[]
- The roles to check - Returns
boolean
- True if it contains at least one of the given roles to check for the given app, false otherwise
- appName:
- hasGlobalAccess(rolesToCheck: string[]):
boolean
Checks if the user has at least one of the given roles to check in the global roles.- rolesToCheck:
string[]
- The roles to check - Returns
boolean
- True if it contains at least one of the given roles to check, false otherwise
- rolesToCheck:
- resetAccess()
Resets the cached access of the user