Fetch the userInfo once loggedIn and expose the capability of admin (#7682)

* Fetch the userInfo once loggedIn and expose the cabilibility of admin

* Rollback method

* Return same use if defined

* Use the same pepleContent service for UserInfoCOmpnent

* Remove useless import

* Use interface

* Use angular resolver instead of guard

* Remove fdescribe

* Fix linting

* Regenerate doc

* Improve doc

* Fix optional

* Fix the unit test

* Fix comment

* Fix lint

* Fix unit

* Add fetch user as part of the ssoGuard

* Fix unit test after fetch

* Add additional unit

* Fix await
This commit is contained in:
Maurizio Vitale
2022-06-27 12:02:01 +01:00
committed by GitHub
parent a30de37a02
commit 28a47e83d2
49 changed files with 378 additions and 332 deletions
+4 -4
View File
@@ -17,15 +17,15 @@ Supports localisation.
Adds a new folder of translation source files.
- _name:_ `string` - Name for the translation provider
- _path:_ `string` - Path to the folder
- **get**(key: `string|Array<string>`, interpolateParams?: `Object`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string|any>`<br/>
- **get**(key: `string|Array<string>`, interpolateParams?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string|any>`<br/>
Gets the translation for the supplied key.
- _key:_ `string|Array<string>` - Key to translate
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
- _interpolateParams:_ `any` - (Optional) String(s) to be interpolated into the main message
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string|any>` - Translated text
- **instant**(key: `string|Array<string>`, interpolateParams?: `Object`): `string|any`<br/>
- **instant**(key: `string|Array<string>`, interpolateParams?: `any`): `string|any`<br/>
Directly returns the translation for the supplied key.
- _key:_ `string|Array<string>` - Key to translate
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
- _interpolateParams:_ `any` - (Optional) String(s) to be interpolated into the main message
- **Returns** `string|any` - Translated text
- **loadTranslation**(lang: `string`, fallback?: `string`)<br/>
Loads a translation file.