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

View File

@@ -13,29 +13,31 @@ Display a dialog that allows to upload new file version or to manage the current
### Methods
- **openUploadNewVersionDialog**(data: [NewVersionUploaderDialogData](../../../lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts), config: `MatDialogConfig`): `Observable`<br/>
Opens a dialog to upload new file version or to manage current node versions
- _data:_ [NewVersionUploaderDialogData](../../../lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts) - The data to pass to the dialog
- _config:_ `MatDialogConfig` - A configuration object that allows to override default dialog configuration
- **Returns** `Observable` - [`Observable`](http://reactivex.io/documentation/observable.html) which you can subscribe in order to get information about the dialog actions or error notification in case of error condition.
- **openUploadNewVersionDialog**(data: [`NewVersionUploaderDialogData`](../../../lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts), config: `MatDialogConfig`): [`Observable`](http://reactivex.io/documentation/observable.html)<br/>
Opens a dialog to upload new file version or to manage current node versions
- _data:_ [`NewVersionUploaderDialogData`](../../../lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts) - The data to pass to the dialog
- _config:_ `MatDialogConfig` - A configuration object that allows to override default dialog configuration
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html) - [`Observable`](http://reactivex.io/documentation/observable.html) which you can subscribe in order to get information about the dialog actions or error notification in case of error condition.
## Details
You can open dialog in two different ways:
- [Upload new file version](#upload-new-version)
- [Manage node versions](#manage-versions)
- [Upload new file version](#upload-new-version)
- [Manage node versions](#manage-versions)
### Upload New Version
The dialog shows
- a side by side comparison between the current target node (type, name, icon) and the new file that should update it's version
- the new version's minor/major changes
- the optional comment
- a button to upload a new file version
![Upload new version image](../../docassets/images/adf-new-version-uploader_upload.png)
- a side by side comparison between the current target node (type, name, icon) and the new file that should update it's version
- the new version's minor/major changes
- the optional comment
- a button to upload a new file version
![Upload new version image](../../docassets/images/adf-new-version-uploader_upload.png)
Usage example:
```ts
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
@@ -56,7 +58,7 @@ yourFunctionToOpenDialog(){
}
```
---
* * *
### Manage Versions
@@ -64,6 +66,7 @@ Setting `showVersionsOnly` to `true` the dialog displays the version history of
![Manage versions image](../../docassets/images/adf-new-version-uploader_manage-versions.png)
Usage example:
```ts
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
@@ -84,6 +87,6 @@ yourFunctionToOpenDialog(){
## See Also
- [Version list component](../components/docs/content-services/components/version-list.component.md)
- [Version Comparison Component](../components/docs/content-services/components/version-comparison.component.md)
- [Version Upload Component](../components/docs/content-services/components/version-upload.component.md)
- [Version list component](../components/docs/content-services/components/version-list.component.md)
- [Version Comparison Component](../components/docs/content-services/components/version-comparison.component.md)
- [Version Upload Component](../components/docs/content-services/components/version-upload.component.md)