mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
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:
@@ -23,34 +23,34 @@ Manages Audit apps and entries.
|
||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` -
|
||||
- **getAuditApp**(auditApplicationId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditAppEntry`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditAppEntry.ts)`>`<br/>
|
||||
- **getAuditApp**(auditApplicationId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppEntry>`<br/>
|
||||
Get audit application info.
|
||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||
- _opts:_ `any` - (Optional)Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditAppEntry`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditAppEntry.ts)`>` -
|
||||
- **getAuditApps**(opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditAppPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditAppPaging.ts)`>`<br/>
|
||||
- _opts:_ `any` - (Optional) Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppEntry>` -
|
||||
- **getAuditApps**(opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppPaging>`<br/>
|
||||
List audit applications.
|
||||
- _opts:_ `any` - (Optional)Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditAppPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditAppPaging.ts)`>` -
|
||||
- **getAuditEntries**(auditApplicationId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditEntryPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditEntryPaging.ts)`>`<br/>
|
||||
- _opts:_ `any` - (Optional) Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppPaging>` -
|
||||
- **getAuditEntries**(auditApplicationId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>`<br/>
|
||||
List audit entries for an audit application.
|
||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||
- _opts:_ `any` - (Optional)Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditEntryPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditEntryPaging.ts)`>` -
|
||||
- **getAuditEntriesForNode**(nodeId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditEntryPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditEntryPaging.ts)`>`<br/>
|
||||
- _opts:_ `any` - (Optional) Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>` -
|
||||
- **getAuditEntriesForNode**(nodeId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>`<br/>
|
||||
List audit entries for a node.
|
||||
- _nodeId:_ `string` - The identifier of a node.
|
||||
- _opts:_ `any` - (Optional)Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditEntryPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditEntryPaging.ts)`>` -
|
||||
- **getAuditEntry**(auditApplicationId: `string`, auditEntryId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditEntryEntry`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditEntryEntry.ts)`>`<br/>
|
||||
- _opts:_ `any` - (Optional) Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>` -
|
||||
- **getAuditEntry**(auditApplicationId: `string`, auditEntryId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryEntry>`<br/>
|
||||
Get audit entry.
|
||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
||||
- _opts:_ `any` - (Optional)Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditEntryEntry`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditEntryEntry.ts)`>` -
|
||||
- **updateAuditApp**(auditApplicationId: `string`, auditAppBodyUpdate: `boolean`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditApp`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditApp.ts)`|__type>`<br/>
|
||||
- _opts:_ `any` - (Optional) Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryEntry>` -
|
||||
- **updateAuditApp**(auditApplicationId: `string`, auditAppBodyUpdate: `boolean`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditApp|any>`<br/>
|
||||
Update audit application info.
|
||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||
- _auditAppBodyUpdate:_ `boolean` - The audit application to update.
|
||||
- _opts:_ `any` - (Optional)Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AuditApp`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/auditApp.ts)`|__type>` -
|
||||
- _opts:_ `any` - (Optional) Options.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditApp|any>` -
|
||||
|
@@ -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
|
||||

|
||||
- 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
|
||||

|
||||
|
||||
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
|
||||

|
||||
|
||||
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)
|
||||
|
@@ -18,17 +18,17 @@ Manages ratings for items in Content Services.
|
||||
- _nodeId:_ `string` - Target node
|
||||
- _ratingType:_ `any` - Type of rating to remove (can be "likes" or "fiveStar")
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response indicating that the operation is complete
|
||||
- **getRating**(nodeId: `string`, ratingType: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|__type>`<br/>
|
||||
- **getRating**(nodeId: `string`, ratingType: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|any>`<br/>
|
||||
Gets the current user's rating for a node.
|
||||
- _nodeId:_ `string` - Node to get the rating from
|
||||
- _ratingType:_ `any` - Type of rating (can be "likes" or "fiveStar")
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|__type>` - The rating value
|
||||
- **postRating**(nodeId: `string`, ratingType: `string`, vote: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|__type>`<br/>
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|any>` - The rating value
|
||||
- **postRating**(nodeId: `string`, ratingType: `string`, vote: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|any>`<br/>
|
||||
Adds the current user's rating for a node.
|
||||
- _nodeId:_ `string` - Target node for the rating
|
||||
- _ratingType:_ `string` - Type of rating (can be "likes" or "fiveStar")
|
||||
- _vote:_ `any` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|__type>` - Details about the rating, including the new value
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RatingEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/RatingEntry.md)`|any>` - Details about the rating, including the new value
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -45,9 +45,9 @@ Stores information from all the custom search and faceted search widgets, compil
|
||||
Gets the query group.
|
||||
- _query:_ `any` - Target query
|
||||
- **Returns** `any` - Query group
|
||||
- **getScope**(): [`RequestScope`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/search-rest-api/model/requestScope.ts)<br/>
|
||||
- **getScope**(): `RequestScope`<br/>
|
||||
|
||||
- **Returns** [`RequestScope`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/search-rest-api/model/requestScope.ts) -
|
||||
- **Returns** `RequestScope` -
|
||||
|
||||
- **getSearchFormDetails**(): [`SearchForm`](../../../lib/content-services/src/lib/search/models/search-form.interface.ts)`[]`<br/>
|
||||
|
||||
@@ -86,9 +86,9 @@ Stores information from all the custom search and faceted search widgets, compil
|
||||
- _queryBody:_ `QueryBody` -
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ResultSetPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/search-rest-api/docs/ResultSetPaging.md)`>` -
|
||||
|
||||
- **setScope**(scope: [`RequestScope`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/search-rest-api/model/requestScope.ts))<br/>
|
||||
- **setScope**(scope: `RequestScope`)<br/>
|
||||
|
||||
- _scope:_ [`RequestScope`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/search-rest-api/model/requestScope.ts) -
|
||||
- _scope:_ `RequestScope` -
|
||||
|
||||
- **update**(queryBody?: `QueryBody`)<br/>
|
||||
Builds the current query and triggers the `updated` event.
|
||||
|
Reference in New Issue
Block a user