mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +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:
parent
a30de37a02
commit
28a47e83d2
@ -233,6 +233,7 @@ for more information about installing and using the source code.
|
|||||||
| [Thumbnail service](core/services/thumbnail.service.md) | Retrieves an SVG thumbnail image to represent a document type. | [Source](../lib/core/services/thumbnail.service.ts) |
|
| [Thumbnail service](core/services/thumbnail.service.md) | Retrieves an SVG thumbnail image to represent a document type. | [Source](../lib/core/services/thumbnail.service.ts) |
|
||||||
| [Translation service](core/services/translation.service.md) | Supports localisation. | [Source](../lib/core/services/translation.service.ts) |
|
| [Translation service](core/services/translation.service.md) | Supports localisation. | [Source](../lib/core/services/translation.service.ts) |
|
||||||
| [Upload Service](core/services/upload.service.md) | Provides access to various APIs related to file upload features. | [Source](../lib/core/services/upload.service.ts) |
|
| [Upload Service](core/services/upload.service.md) | Provides access to various APIs related to file upload features. | [Source](../lib/core/services/upload.service.ts) |
|
||||||
|
| [User access service](core/services/user-access.service.md) | Checks the global and application access of a user | [Source](../lib/core/services/user-access.service.ts) |
|
||||||
| [User Preferences Service](core/services/user-preferences.service.md) | Stores preferences for the app and for individual components. | [Source](../lib/core/services/user-preferences.service.ts) |
|
| [User Preferences Service](core/services/user-preferences.service.md) | Stores preferences for the app and for individual components. | [Source](../lib/core/services/user-preferences.service.ts) |
|
||||||
|
|
||||||
### Widgets
|
### Widgets
|
||||||
@ -354,6 +355,7 @@ for more information about installing and using the source code.
|
|||||||
| [Document Actions service](content-services/services/document-actions.service.md) | Implements the document menu actions for the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/document-actions.service.ts) |
|
| [Document Actions service](content-services/services/document-actions.service.md) | Implements the document menu actions for the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/document-actions.service.ts) |
|
||||||
| [Document List service](content-services/services/document-list.service.md) | Implements node operations used by the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/document-list.service.ts) |
|
| [Document List service](content-services/services/document-list.service.md) | Implements node operations used by the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/document-list.service.ts) |
|
||||||
| [Folder Actions service](content-services/services/folder-actions.service.md) | Implements the folder menu actions for the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/folder-actions.service.ts) |
|
| [Folder Actions service](content-services/services/folder-actions.service.md) | Implements the folder menu actions for the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/folder-actions.service.ts) |
|
||||||
|
| [New Version Uploader service](content-services/services/new-version-uploader.dialog.service.md) | Display a dialog that allows to upload new file version or to manage the current node versions. | [Source](../lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts) |
|
||||||
| [Node permission dialog service](content-services/services/node-permission-dialog.service.md) | Displays dialogs to let the user set node permissions. | [Source](../lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.ts) |
|
| [Node permission dialog service](content-services/services/node-permission-dialog.service.md) | Displays dialogs to let the user set node permissions. | [Source](../lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.ts) |
|
||||||
| [Node Permission service](content-services/services/node-permission.service.md) | Manages role permissions for content nodes. | [Source](../lib/content-services/src/lib/permission-manager/services/node-permission.service.ts) |
|
| [Node Permission service](content-services/services/node-permission.service.md) | Manages role permissions for content nodes. | [Source](../lib/content-services/src/lib/permission-manager/services/node-permission.service.ts) |
|
||||||
| [Rating service](content-services/services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/src/lib/social/services/rating.service.ts) |
|
| [Rating service](content-services/services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/src/lib/social/services/rating.service.ts) |
|
||||||
|
@ -23,34 +23,34 @@ Manages Audit apps and entries.
|
|||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||||
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` -
|
- **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.
|
Get audit application info.
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||||
- _opts:_ `any` - (Optional)Options.
|
- _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)`>` -
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppEntry>` -
|
||||||
- **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/>
|
- **getAuditApps**(opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppPaging>`<br/>
|
||||||
List audit applications.
|
List audit applications.
|
||||||
- _opts:_ `any` - (Optional)Options.
|
- _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)`>` -
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditAppPaging>` -
|
||||||
- **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/>
|
- **getAuditEntries**(auditApplicationId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>`<br/>
|
||||||
List audit entries for an audit application.
|
List audit entries for an audit application.
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||||
- _opts:_ `any` - (Optional)Options.
|
- _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)`>` -
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>` -
|
||||||
- **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/>
|
- **getAuditEntriesForNode**(nodeId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>`<br/>
|
||||||
List audit entries for a node.
|
List audit entries for a node.
|
||||||
- _nodeId:_ `string` - The identifier of a node.
|
- _nodeId:_ `string` - The identifier of a node.
|
||||||
- _opts:_ `any` - (Optional)Options.
|
- _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)`>` -
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryPaging>` -
|
||||||
- **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/>
|
- **getAuditEntry**(auditApplicationId: `string`, auditEntryId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryEntry>`<br/>
|
||||||
Get audit entry.
|
Get audit entry.
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||||
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
- _auditEntryId:_ `string` - The identifier of an audit entry.
|
||||||
- _opts:_ `any` - (Optional)Options.
|
- _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)`>` -
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditEntryEntry>` -
|
||||||
- **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/>
|
- **updateAuditApp**(auditApplicationId: `string`, auditAppBodyUpdate: `boolean`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<AuditApp|any>`<br/>
|
||||||
Update audit application info.
|
Update audit application info.
|
||||||
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
- _auditApplicationId:_ `string` - The identifier of an audit application.
|
||||||
- _auditAppBodyUpdate:_ `boolean` - The audit application to update.
|
- _auditAppBodyUpdate:_ `boolean` - The audit application to update.
|
||||||
- _opts:_ `any` - (Optional)Options.
|
- _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>` -
|
- **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
|
### Methods
|
||||||
|
|
||||||
- **openUploadNewVersionDialog**(data: [NewVersionUploaderDialogData](../../../lib/content-services/src/lib/new-version-uploader/models/new-version-uploader.model.ts), config: `MatDialogConfig`): `Observable`<br/>
|
- **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
|
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
|
- _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
|
- _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.
|
- **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
|
## Details
|
||||||
|
|
||||||
You can open dialog in two different ways:
|
You can open dialog in two different ways:
|
||||||
|
|
||||||
- [Upload new file version](#upload-new-version)
|
- [Upload new file version](#upload-new-version)
|
||||||
- [Manage node versions](#manage-versions)
|
- [Manage node versions](#manage-versions)
|
||||||
|
|
||||||
### Upload New Version
|
### Upload New Version
|
||||||
|
|
||||||
The dialog shows
|
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
|
- 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 new version's minor/major changes
|
||||||
- the optional comment
|
- the optional comment
|
||||||
- a button to upload a new file version
|
- a button to upload a new file version
|
||||||

|

|
||||||
|
|
||||||
Usage example:
|
Usage example:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
|
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
|
||||||
|
|
||||||
@ -56,7 +58,7 @@ yourFunctionToOpenDialog(){
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
* * *
|
||||||
|
|
||||||
### Manage Versions
|
### Manage Versions
|
||||||
|
|
||||||
@ -64,6 +66,7 @@ Setting `showVersionsOnly` to `true` the dialog displays the version history of
|
|||||||

|

|
||||||
|
|
||||||
Usage example:
|
Usage example:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
|
import { NewVersionUploaderService } from '@alfresco/adf-content-services'
|
||||||
|
|
||||||
@ -84,6 +87,6 @@ yourFunctionToOpenDialog(){
|
|||||||
|
|
||||||
## See Also
|
## See Also
|
||||||
|
|
||||||
- [Version list component](../components/docs/content-services/components/version-list.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 Comparison Component](../components/docs/content-services/components/version-comparison.component.md)
|
||||||
- [Version Upload Component](../components/docs/content-services/components/version-upload.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
|
- _nodeId:_ `string` - Target node
|
||||||
- _ratingType:_ `any` - Type of rating to remove (can be "likes" or "fiveStar")
|
- _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
|
- **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.
|
Gets the current user's rating for a node.
|
||||||
- _nodeId:_ `string` - Node to get the rating from
|
- _nodeId:_ `string` - Node to get the rating from
|
||||||
- _ratingType:_ `any` - Type of rating (can be "likes" or "fiveStar")
|
- _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
|
- **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)`|__type>`<br/>
|
- **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.
|
Adds the current user's rating for a node.
|
||||||
- _nodeId:_ `string` - Target node for the rating
|
- _nodeId:_ `string` - Target node for the rating
|
||||||
- _ratingType:_ `string` - Type of rating (can be "likes" or "fiveStar")
|
- _ratingType:_ `string` - Type of rating (can be "likes" or "fiveStar")
|
||||||
- _vote:_ `any` - Rating value (boolean for "likes", numeric 0..5 for "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
|
## Details
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ Stores information from all the custom search and faceted search widgets, compil
|
|||||||
Gets the query group.
|
Gets the query group.
|
||||||
- _query:_ `any` - Target query
|
- _query:_ `any` - Target query
|
||||||
- **Returns** `any` - Query group
|
- **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/>
|
- **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` -
|
- _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)`>` -
|
- **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/>
|
- **update**(queryBody?: `QueryBody`)<br/>
|
||||||
Builds the current query and triggers the `updated` event.
|
Builds the current query and triggers the `updated` event.
|
||||||
|
@ -21,7 +21,7 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
|||||||
- [Column Template](#column-template)
|
- [Column Template](#column-template)
|
||||||
- [Styling Techniques](#styling-techniques)
|
- [Styling Techniques](#styling-techniques)
|
||||||
- [Using the copyContent option](#using-the-copycontent-option)
|
- [Using the copyContent option](#using-the-copycontent-option)
|
||||||
- [Exapmple of column customData](#example-of-column-customData)
|
- [Example of column customData](#example-of-column-customdata)
|
||||||
- [See also](#see-also)
|
- [See also](#see-also)
|
||||||
|
|
||||||
## Basic Usage
|
## Basic Usage
|
||||||
@ -44,18 +44,18 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
|||||||
|
|
||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| id | `string` | '' | Column identifier. |
|
|
||||||
| copyContent | `boolean` | | Enables/disables a [Clipboard directive](../../core/directives/clipboard.directive.md) to allow copying of cell contents. |
|
| copyContent | `boolean` | | Enables/disables a [Clipboard directive](../../core/directives/clipboard.directive.md) to allow copying of cell contents. |
|
||||||
| cssClass | `string` | | Additional CSS class to be applied to column (header and cells). |
|
| cssClass | `string` | | Additional CSS class to be applied to column (header and cells). |
|
||||||
|
| customData | `any` | | You can specify any custom data which can be used by any specific feature |
|
||||||
|
| draggable | `boolean` | false | Toggles drag and drop for header column. |
|
||||||
| editable | `boolean` | false | Toggles the editing support of the column data. |
|
| editable | `boolean` | false | Toggles the editing support of the column data. |
|
||||||
| focus | `boolean` | true | Enable or disable cell focus |
|
| focus | `boolean` | true | Enable or disable cell focus |
|
||||||
| format | `string` | | Value format (if supported by the parent component), for example format of the date. |
|
| format | `string` | | Value format (if supported by the parent component), for example format of the date. |
|
||||||
| formatTooltip | `Function` | | Custom tooltip formatter function. |
|
| formatTooltip | `Function` | | Custom tooltip formatter function. |
|
||||||
|
| id | `string` | "" | Column identifier. |
|
||||||
|
| isHidden | `boolean` | false | Hides columns |
|
||||||
| key | `string` | | Data source key. Can be either a column/property key like `title` or a property path like `createdBy.name`. |
|
| key | `string` | | Data source key. Can be either a column/property key like `title` or a property path like `createdBy.name`. |
|
||||||
| sortable | `boolean` | true | Toggles ability to sort by this column, for example by clicking the column header. |
|
| sortable | `boolean` | true | Toggles ability to sort by this column, for example by clicking the column header. |
|
||||||
| customData | `Generic` | any | Any feature specific data |
|
|
||||||
| draggable | `boolean` | false | Toggles drag and drop for header column. |
|
|
||||||
| isHidden | `boolean` | false | Hides columns |
|
|
||||||
| sortingKey | `string` | | When using server side sorting the column used by the api call where the sorting will be performed |
|
| sortingKey | `string` | | When using server side sorting the column used by the api call where the sorting will be performed |
|
||||||
| srTitle | `string` | | Title to be used for screen readers. |
|
| srTitle | `string` | | Title to be used for screen readers. |
|
||||||
| title | `string` | "" | Display title of the column, typically used for column headers. You can use the i18n resource key to get it translated automatically. |
|
| title | `string` | "" | Display title of the column, typically used for column headers. You can use the i18n resource key to get it translated automatically. |
|
||||||
@ -363,7 +363,7 @@ HTML `<data-column>` element example:
|
|||||||
<data-column [customData]="MyCustomData" key="id" title="Id"></data-column>
|
<data-column [customData]="MyCustomData" key="id" title="Id"></data-column>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can use generic type for `DataColumn` in order to get intellisense working e.g.
|
You can use generic type for [`DataColumn`](../../../lib/core/datatable/data/data-column.model.ts) in order to get intellisense working e.g.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
const dataColumn: DataColumn<{ shouldPerformActionIfDisplayed: boolean }> = {
|
const dataColumn: DataColumn<{ shouldPerformActionIfDisplayed: boolean }> = {
|
||||||
|
@ -375,6 +375,7 @@ Learm more about styling your datatable: [Customizing the component's styles](#c
|
|||||||
| display | `string` | DisplayMode.List | Selects the display mode of the table. Can be "list" or "gallery". |
|
| display | `string` | DisplayMode.List | Selects the display mode of the table. Can be "list" or "gallery". |
|
||||||
| fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. |
|
| fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. |
|
||||||
| loading | `boolean` | false | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). |
|
| loading | `boolean` | false | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). |
|
||||||
|
| mainTableAction | `boolean` | true | Toggles main data table action column. |
|
||||||
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
|
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
|
||||||
| noPermission | `boolean` | false | Flag that indicates if the datatable should show the "no permission" template. |
|
| noPermission | `boolean` | false | Flag that indicates if the datatable should show the "no permission" template. |
|
||||||
| resolverFn | `Function` | null | Custom resolver function which is used to parse dynamic column objects see the docs to learn how to configure a resolverFn. |
|
| resolverFn | `Function` | null | Custom resolver function which is used to parse dynamic column objects see the docs to learn how to configure a resolverFn. |
|
||||||
@ -384,6 +385,7 @@ Learm more about styling your datatable: [Customizing the component's styles](#c
|
|||||||
| rows | `any[]` | \[] | The rows that the datatable will show. |
|
| rows | `any[]` | \[] | The rows that the datatable will show. |
|
||||||
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||||
| showHeader | `ShowHeaderMode` | | Toggles the header. |
|
| showHeader | `ShowHeaderMode` | | Toggles the header. |
|
||||||
|
| showMainDatatableActions | `boolean` | false | Toggles the main datatable action. |
|
||||||
| sorting | `any[]` | \[] | Define the sort order of the datatable. Possible values are : [`created`, `desc`], [`created`, `asc`], [`due`, `desc`], [`due`, `asc`] |
|
| sorting | `any[]` | \[] | Define the sort order of the datatable. Possible values are : [`created`, `desc`], [`created`, `asc`], [`due`, `desc`], [`due`, `asc`] |
|
||||||
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
|
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
|
||||||
|
|
||||||
@ -391,13 +393,12 @@ Learm more about styling your datatable: [Customizing the component's styles](#c
|
|||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ---- | ---- | ----------- |
|
| ---- | ---- | ----------- |
|
||||||
|
| columnOrderChanged | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataColumn`](../../../lib/core/datatable/data/data-column.model.ts)`<>[]>` | Emitted after dragging and dropping column header. |
|
||||||
| executeRowAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowActionEvent`](../../../lib/core/datatable/components/data-row-action.event.ts)`>` | Emitted when the user executes a row action. |
|
| executeRowAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowActionEvent`](../../../lib/core/datatable/components/data-row-action.event.ts)`>` | Emitted when the user executes a row action. |
|
||||||
| rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user clicks a row. |
|
| rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user clicks a row. |
|
||||||
| rowDblClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user double-clicks a row. |
|
| rowDblClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user double-clicks a row. |
|
||||||
| showRowActionsMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the actions menu is displayed for a row. |
|
| showRowActionsMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the actions menu is displayed for a row. |
|
||||||
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
|
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
|
||||||
| columnOrderChanged | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataColumn`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted after dragging and dropping column header. |
|
|
||||||
|
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ based on the field type or the metadata information.
|
|||||||
|
|
||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| field | [`FormFieldModel`](../../core/models/form-field.model.md) | null | Contains all the necessary data needed to determine what UI [`Widget`](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the `FormFieldModel` definitions. |
|
| field | [`FormFieldModel`](../../core/models/form-field.model.md) | null | Contains all the necessary data needed to determine what UI Widget to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the [`FormFieldModel`](../../core/models/form-field.model.md) definitions. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ Displays the Start [`Form`](../../../lib/process-services/src/lib/task-list/mode
|
|||||||
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
|
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
|
||||||
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
||||||
| path | `string` | | Path of the folder where the metadata will be stored. |
|
| path | `string` | | Path of the folder where the metadata will be stored. |
|
||||||
| processDefinitionId | `string` | | [Definition](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/definition.ts) ID of the process to start, this parameter can not be use in combination with processId |
|
| processDefinitionId | `string` | | Definition ID of the process to start, this parameter can not be use in combination with processId |
|
||||||
| processId | `string` | | Process ID of the process to start, this parameter can not be use in combination with processDefinitionId |
|
| processId | `string` | | Process ID of the process to start, this parameter can not be use in combination with processDefinitionId |
|
||||||
| readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
|
| readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
|
||||||
| readOnlyForm | `boolean` | false | Is the form read-only (ie, can't be edited)? |
|
| readOnlyForm | `boolean` | false | Is the form read-only (ie, can't be edited)? |
|
||||||
|
@ -30,6 +30,10 @@ Supports app configuration settings, stored server side.
|
|||||||
- **load**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<any>`<br/>
|
- **load**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<any>`<br/>
|
||||||
Loads the config file.
|
Loads the config file.
|
||||||
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<any>` - Notification when loading is complete
|
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<any>` - Notification when loading is complete
|
||||||
|
- **loadWellKnown**(hostIdp: `string`): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<`[`OpenidConfiguration`](../../../lib/core/services/openid-configuration.interface.ts)`>`<br/>
|
||||||
|
Call the discovery API to fetch configuration
|
||||||
|
- _hostIdp:_ `string` -
|
||||||
|
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<`[`OpenidConfiguration`](../../../lib/core/services/openid-configuration.interface.ts)`>` - Discovery configuration
|
||||||
- **select**(property: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
- **select**(property: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||||
Requests notification of a property value when it is loaded.
|
Requests notification of a property value when it is loaded.
|
||||||
- _property:_ `string` - The desired property value
|
- _property:_ `string` - The desired property value
|
||||||
|
@ -13,20 +13,20 @@ Maps type names to field component types for the [Card View component](../compon
|
|||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<__type>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts)<br/>
|
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<any>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts)<br/>
|
||||||
Gets the currently active [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
Gets the currently active [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
||||||
- _type:_ `string` - The type whose resolver you want
|
- _type:_ `string` - The type whose resolver you want
|
||||||
- _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
|
- _defaultValue:_ `Type<any>` - Default type returned for types that are not yet mapped
|
||||||
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
|
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||||
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
||||||
Register multiple components
|
Register multiple components
|
||||||
- _components:_ `Function` -
|
- _components:_ `Function` -
|
||||||
- _override:_ `boolean` -
|
- _override:_ `boolean` -
|
||||||
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts), defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
|
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts), defaultValue: `Type<any>` = `this.defaultValue`): `Type<any>`<br/>
|
||||||
Finds the component type that is needed to render a form field.
|
Finds the component type that is needed to render a form field.
|
||||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) field model for the field to render
|
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) field model for the field to render
|
||||||
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
|
- _defaultValue:_ `Type<any>` - Default type returned for field types that are not yet mapped.
|
||||||
- **Returns** `Type<__type>` - Component type
|
- **Returns** `Type<any>` - Component type
|
||||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||||
Sets or optionally replaces a [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
Sets or optionally replaces a [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
||||||
- _type:_ `string` - The type whose resolver you want to set
|
- _type:_ `string` - The type whose resolver you want to set
|
||||||
|
@ -13,9 +13,9 @@ Gets a list of Content Services nodes currently in the trash.
|
|||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- **getDeletedNodes**(options?: `Object`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
|
- **getDeletedNodes**(options?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
|
||||||
Gets a list of nodes in the trash.
|
Gets a list of nodes in the trash.
|
||||||
- _options:_ `Object` - (Optional) Options for JS-API call
|
- _options:_ `any` - (Optional) Options for JS-API call
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>` - List of nodes in the trash
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>` - List of nodes in the trash
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
@ -20,9 +20,9 @@ Gets version and license information for Process Services and Content Services.
|
|||||||
- **getBpmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmProductVersionModel`](../../../lib/core/models/product-version.model.ts)`>`<br/>
|
- **getBpmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmProductVersionModel`](../../../lib/core/models/product-version.model.ts)`>`<br/>
|
||||||
Gets product information for Process Services.
|
Gets product information for Process Services.
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmProductVersionModel`](../../../lib/core/models/product-version.model.ts)`>` - ProductVersionModel containing product details
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmProductVersionModel`](../../../lib/core/models/product-version.model.ts)`>` - ProductVersionModel containing product details
|
||||||
- **getEcmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RepositoryInfo`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/discovery-rest-api/model/repositoryInfo.ts)`>`<br/>
|
- **getEcmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<RepositoryInfo>`<br/>
|
||||||
Gets product information for Content Services.
|
Gets product information for Content Services.
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RepositoryInfo`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/discovery-rest-api/model/repositoryInfo.ts)`>` - ProductVersionModel containing product details
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<RepositoryInfo>` - ProductVersionModel containing product details
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@ Gets a list of items a user has marked as their favorites.
|
|||||||
- _entries:_ `any[]` -
|
- _entries:_ `any[]` -
|
||||||
- **Returns** `any[]` -
|
- **Returns** `any[]` -
|
||||||
|
|
||||||
- **remapFavoritesData**(data: [`FavoritePaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/favoritePaging.ts) = `{}`): [`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)<br/>
|
- **remapFavoritesData**(data: `FavoritePaging` = `{}`): [`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)<br/>
|
||||||
|
|
||||||
- _data:_ [`FavoritePaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/favoritePaging.ts) -
|
- _data:_ `FavoritePaging` -
|
||||||
- **Returns** [`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md) -
|
- **Returns** [`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md) -
|
||||||
|
|
||||||
- **remapEntry**(\_\_namedParameters: `Function`): `any`<br/>
|
- **remapEntry**(\_\_namedParameters: `Function`): `any`<br/>
|
||||||
|
@ -13,20 +13,20 @@ Maps a form field type string onto the corresponding form [widget component](../
|
|||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<__type>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts)<br/>
|
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<any>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts)<br/>
|
||||||
Gets the currently active [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
Gets the currently active [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
||||||
- _type:_ `string` - The type whose resolver you want
|
- _type:_ `string` - The type whose resolver you want
|
||||||
- _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
|
- _defaultValue:_ `Type<any>` - Default type returned for types that are not yet mapped
|
||||||
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
|
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||||
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
||||||
Register multiple components
|
Register multiple components
|
||||||
- _components:_ `Function` -
|
- _components:_ `Function` -
|
||||||
- _override:_ `boolean` -
|
- _override:_ `boolean` -
|
||||||
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts), defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
|
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts), defaultValue: `Type<any>` = `this.defaultValue`): `Type<any>`<br/>
|
||||||
Finds the component type that is needed to render a form field.
|
Finds the component type that is needed to render a form field.
|
||||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) field model for the field to render
|
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) field model for the field to render
|
||||||
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
|
- _defaultValue:_ `Type<any>` - Default type returned for field types that are not yet mapped.
|
||||||
- **Returns** `Type<__type>` - Component type
|
- **Returns** `Type<any>` - Component type
|
||||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||||
Sets or optionally replaces a [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
Sets or optionally replaces a [DynamicComponentResolveFunction](../../../lib/core/services/dynamic-component-mapper.service.ts) for a field type.
|
||||||
- _type:_ `string` - The type whose resolver you want to set
|
- _type:_ `string` - The type whose resolver you want to set
|
||||||
|
@ -13,10 +13,10 @@ Decodes a JSON Web Token (JWT) to a JavaScript object.
|
|||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- **decodeToken**(token: `any`): `Object`<br/>
|
- **decodeToken**(token: `any`): `any`<br/>
|
||||||
Decodes a JSON web token into a JS object.
|
Decodes a JSON web token into a JS object.
|
||||||
- _token:_ `any` - Token in encoded form
|
- _token:_ `any` - Token in encoded form
|
||||||
- **Returns** `Object` - Decoded token data object
|
- **Returns** `any` - Decoded token data object
|
||||||
- **getAccessToken**(): `string`<br/>
|
- **getAccessToken**(): `string`<br/>
|
||||||
Gets access token
|
Gets access token
|
||||||
- **Returns** `string` - access token
|
- **Returns** `string` - access token
|
||||||
|
@ -18,25 +18,30 @@ Gets information about a Content Services user.
|
|||||||
- _newPerson:_ [`PersonBodyCreate`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/model/personBodyCreate.ts) - Object containing the new person details.
|
- _newPerson:_ [`PersonBodyCreate`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/model/personBodyCreate.ts) - Object containing the new person details.
|
||||||
- _opts:_ `any` - (Optional) Optional parameters
|
- _opts:_ `any` - (Optional) Optional parameters
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - Created new person
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - Created new person
|
||||||
- **getCurrentPerson**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
- **getCurrentUserInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>
|
||||||
Gets information about the user who is currently logged in.
|
Gets information about the current user alias -me-
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - User information
|
||||||
- **getPerson**(personId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
- **getPerson**(personId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>
|
||||||
Gets information about a user identified by their username.
|
Gets information about a user identified by their username.
|
||||||
- _personId:_ `string` - ID of the target user
|
- _personId:_ `string` - ID of the target user
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - User information
|
||||||
- **isContentAdmin**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<boolean>`<br/>
|
- **getUserProfileImage**(avatarId: `string`): `string`<br/>
|
||||||
|
Returns a profile image as a URL.
|
||||||
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<boolean>` -
|
- _avatarId:_ `string` - Target avatar
|
||||||
|
- **Returns** `string` - Image URL
|
||||||
|
- **isCurrentUserAdmin**(): `boolean`<br/>
|
||||||
|
Used to know if the current user has the admin capability
|
||||||
|
- **Returns** `boolean` - true or false
|
||||||
- **listPeople**(requestQuery?: [`PeopleContentQueryRequestModel`](../../../lib/core/services/people-content.service.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](../../../lib/core/services/people-content.service.ts)`>`<br/>
|
- **listPeople**(requestQuery?: [`PeopleContentQueryRequestModel`](../../../lib/core/services/people-content.service.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](../../../lib/core/services/people-content.service.ts)`>`<br/>
|
||||||
Gets a list of people.
|
Gets a list of people.
|
||||||
- _requestQuery:_ [`PeopleContentQueryRequestModel`](../../../lib/core/services/people-content.service.ts) - (Optional) maxItems and skipCount parameters supported by JS-API
|
- _requestQuery:_ [`PeopleContentQueryRequestModel`](../../../lib/core/services/people-content.service.ts) - (Optional) maxItems and skipCount parameters supported by JS-API
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](../../../lib/core/services/people-content.service.ts)`>` - Response containing pagination and list of entries
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`PeopleContentQueryResponse`](../../../lib/core/services/people-content.service.ts)`>` - Response containing pagination and list of entries
|
||||||
- **updatePerson**(personId: `string`, details: [`PersonBodyUpdate`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/personBodyUpdate.ts), opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>
|
- **resetLocalCurrentUser**()<br/>
|
||||||
|
Reset the local current user object
|
||||||
|
- **updatePerson**(personId: `string`, details: `PersonBodyUpdate`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>
|
||||||
Updates the person details
|
Updates the person details
|
||||||
- _personId:_ `string` - The identifier of a person
|
- _personId:_ `string` - The identifier of a person
|
||||||
- _details:_ [`PersonBodyUpdate`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/personBodyUpdate.ts) - The person details
|
- _details:_ `PersonBodyUpdate` - The person details
|
||||||
- _opts:_ `any` - (Optional) Optional parameters
|
- _opts:_ `any` - (Optional) Optional parameters
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - Updated person model
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - Updated person model
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@ Manages prearranged conversions of content to different formats.
|
|||||||
- _pollingInterval:_ `number` - Time interval (in milliseconds) between checks for completion
|
- _pollingInterval:_ `number` - Time interval (in milliseconds) between checks for completion
|
||||||
- _retries:_ `number` - Number of attempts to make before declaring failure
|
- _retries:_ `number` - Number of attempts to make before declaring failure
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RenditionEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/RenditionEntry.md)`>` - True if the rendition was created, false otherwise
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RenditionEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/RenditionEntry.md)`>` - True if the rendition was created, false otherwise
|
||||||
- **createRendition**(nodeId: `string`, encoding: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<__type>`<br/>
|
- **createRendition**(nodeId: `string`, encoding: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||||
Creates a rendition for a node.
|
Creates a rendition for a node.
|
||||||
- _nodeId:_ `string` - ID of the target node
|
- _nodeId:_ `string` - ID of the target node
|
||||||
- _encoding:_ `string` - Name of the rendition encoding
|
- _encoding:_ `string` - Name of the rendition encoding
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<__type>` - Null response to indicate completion
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response to indicate completion
|
||||||
- **generateRenditionForNode**(nodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
- **generateRenditionForNode**(nodeId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||||
Generates a rendition for a node using the first available encoding.
|
Generates a rendition for a node using the first available encoding.
|
||||||
- _nodeId:_ `string` - ID of the target node
|
- _nodeId:_ `string` - ID of the target node
|
||||||
|
@ -19,9 +19,9 @@ Accesses and manipulates sites from a Content Services repository.
|
|||||||
- _inviteeId:_ `string` - The invitee user name.
|
- _inviteeId:_ `string` - The invitee user name.
|
||||||
- _opts:_ `any` - (Optional) Options supported by JS-API
|
- _opts:_ `any` - (Optional) Options supported by JS-API
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMembershipRequestWithPersonPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMembershipRequestWithPersonPaging.md)`>` - Null response notifying when the operation is complete
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMembershipRequestWithPersonPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMembershipRequestWithPersonPaging.md)`>` - Null response notifying when the operation is complete
|
||||||
- **createSite**(siteBody: [`SiteBodyCreate`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/siteBodyCreate.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
|
- **createSite**(siteBody: `SiteBodyCreate`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
|
||||||
Create a site
|
Create a site
|
||||||
- _siteBody:_ [`SiteBodyCreate`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/siteBodyCreate.ts) - [SiteBodyCreate](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/siteBodyCreate.ts) to create site
|
- _siteBody:_ `SiteBodyCreate` - SiteBodyCreate to create site
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - site SiteEntry
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - site SiteEntry
|
||||||
- **createSiteGroupMembership**(siteId: `string`, siteMembershipBodyCreate: [`SiteMembershipBodyCreate`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMembershipBodyCreate.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteGroupEntry.md)`>`<br/>
|
- **createSiteGroupMembership**(siteId: `string`, siteMembershipBodyCreate: [`SiteMembershipBodyCreate`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMembershipBodyCreate.md)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteGroupEntry.md)`>`<br/>
|
||||||
Create a site membership for group
|
Create a site membership for group
|
||||||
@ -52,24 +52,24 @@ Accesses and manipulates sites from a Content Services repository.
|
|||||||
- **getEcmCurrentLoggedUserName**(): `string`<br/>
|
- **getEcmCurrentLoggedUserName**(): `string`<br/>
|
||||||
Gets the username of the user currently logged into ACS.
|
Gets the username of the user currently logged into ACS.
|
||||||
- **Returns** `string` - Username string
|
- **Returns** `string` - Username string
|
||||||
- **getSite**(siteId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|__type>`<br/>
|
- **getSite**(siteId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|any>`<br/>
|
||||||
Gets the details for a site.
|
Gets the details for a site.
|
||||||
- _siteId:_ `string` - ID of the target site
|
- _siteId:_ `string` - ID of the target site
|
||||||
- _opts:_ `any` - (Optional) Options supported by JS-API
|
- _opts:_ `any` - (Optional) Options supported by JS-API
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|__type>` - Information about the site
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|any>` - Information about the site
|
||||||
- **getSiteContent**(siteId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|__type>`<br/>
|
- **getSiteContent**(siteId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|any>`<br/>
|
||||||
Gets a site's content.
|
Gets a site's content.
|
||||||
- _siteId:_ `string` - ID of the target site
|
- _siteId:_ `string` - ID of the target site
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|__type>` - Site content
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|any>` - Site content
|
||||||
- **getSiteGroupMembership**(siteId: `string`, groupId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteGroupEntry.md)`>`<br/>
|
- **getSiteGroupMembership**(siteId: `string`, groupId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteGroupEntry.md)`>`<br/>
|
||||||
Get information about site membership of group
|
Get information about site membership of group
|
||||||
- _siteId:_ `string` - The identifier of a site.
|
- _siteId:_ `string` - The identifier of a site.
|
||||||
- _groupId:_ `string` - The authorityId of a group.
|
- _groupId:_ `string` - The authorityId of a group.
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteGroupEntry.md)`>` - [Observable](http://reactivex.io/documentation/observable.html)<SiteGroupEntry>
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupEntry`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteGroupEntry.md)`>` - [Observable](http://reactivex.io/documentation/observable.html)<SiteGroupEntry>
|
||||||
- **getSiteMembers**(siteId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|__type>`<br/>
|
- **getSiteMembers**(siteId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|any>`<br/>
|
||||||
Gets a list of all a site's members.
|
Gets a list of all a site's members.
|
||||||
- _siteId:_ `string` - ID of the target site
|
- _siteId:_ `string` - ID of the target site
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|__type>` - Site members
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`|any>` - Site members
|
||||||
- **getSiteMembershipRequests**(opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMembershipRequestWithPersonPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMembershipRequestWithPersonPaging.md)`>`<br/>
|
- **getSiteMembershipRequests**(opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMembershipRequestWithPersonPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMembershipRequestWithPersonPaging.md)`>`<br/>
|
||||||
Gets a list of site membership requests.
|
Gets a list of site membership requests.
|
||||||
- _opts:_ `any` - (Optional) Options supported by JS-API
|
- _opts:_ `any` - (Optional) Options supported by JS-API
|
||||||
@ -82,11 +82,11 @@ Accesses and manipulates sites from a Content Services repository.
|
|||||||
Gets a list of all sites in the repository.
|
Gets a list of all sites in the repository.
|
||||||
- _opts:_ `any` - Options supported by JS-API
|
- _opts:_ `any` - Options supported by JS-API
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md)`>` - List of sites
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md)`>` - List of sites
|
||||||
- **listSiteGroups**(siteId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/siteGroupPaging.ts)`>`<br/>
|
- **listSiteGroups**(siteId: `string`, opts?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<SiteGroupPaging>`<br/>
|
||||||
List group membership for site
|
List group membership for site
|
||||||
- _siteId:_ `string` - The identifier of a site.
|
- _siteId:_ `string` - The identifier of a site.
|
||||||
- _opts:_ `any` - (Optional) Options supported by JS-API
|
- _opts:_ `any` - (Optional) Options supported by JS-API
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteGroupPaging`](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/siteGroupPaging.ts)`>` - [Observable](http://reactivex.io/documentation/observable.html)<SiteGroupPaging>
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<SiteGroupPaging>` - [`Observable`](http://reactivex.io/documentation/observable.html)<SiteGroupPaging>
|
||||||
- **listSiteMemberships**(siteId: `string`, opts: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMemberPaging.md)`>`<br/>
|
- **listSiteMemberships**(siteId: `string`, opts: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMemberPaging.md)`>`<br/>
|
||||||
Gets a list of all a site's members.
|
Gets a list of all a site's members.
|
||||||
- _siteId:_ `string` - ID of the target site
|
- _siteId:_ `string` - ID of the target site
|
||||||
|
@ -17,15 +17,15 @@ Supports localisation.
|
|||||||
Adds a new folder of translation source files.
|
Adds a new folder of translation source files.
|
||||||
- _name:_ `string` - Name for the translation provider
|
- _name:_ `string` - Name for the translation provider
|
||||||
- _path:_ `string` - Path to the folder
|
- _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.
|
Gets the translation for the supplied key.
|
||||||
- _key:_ `string|Array<string>` - Key to translate
|
- _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
|
- **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.
|
Directly returns the translation for the supplied key.
|
||||||
- _key:_ `string|Array<string>` - Key to translate
|
- _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
|
- **Returns** `string|any` - Translated text
|
||||||
- **loadTranslation**(lang: `string`, fallback?: `string`)<br/>
|
- **loadTranslation**(lang: `string`, fallback?: `string`)<br/>
|
||||||
Loads a translation file.
|
Loads a translation file.
|
||||||
|
@ -20,11 +20,16 @@ Provides access to various APIs related to file upload features.
|
|||||||
- **cancelUpload**(files: [`FileModel`](../../../lib/core/models/file.model.ts)`[]`)<br/>
|
- **cancelUpload**(files: [`FileModel`](../../../lib/core/models/file.model.ts)`[]`)<br/>
|
||||||
Cancels uploading of files. If the file is smaller than 1 MB the file will be uploaded and then the node deleted to prevent having files that were aborted but still uploaded.
|
Cancels uploading of files. If the file is smaller than 1 MB the file will be uploaded and then the node deleted to prevent having files that were aborted but still uploaded.
|
||||||
- _files:_ [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files specifying uploads to cancel
|
- _files:_ [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files specifying uploads to cancel
|
||||||
|
- **clearCache**()<br/>
|
||||||
|
|
||||||
- **clearQueue**()<br/>
|
- **clearQueue**()<br/>
|
||||||
Clears the upload queue
|
Clears the upload queue
|
||||||
- **getQueue**(): [`FileModel`](../../../lib/core/models/file.model.ts)`[]`<br/>
|
- **getQueue**(): [`FileModel`](../../../lib/core/models/file.model.ts)`[]`<br/>
|
||||||
Gets the file Queue
|
Gets the file Queue
|
||||||
- **Returns** [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - Array of files that form the queue
|
- **Returns** [`FileModel`](../../../lib/core/models/file.model.ts)`[]` - Array of files that form the queue
|
||||||
|
- **getThreadsCount**(): `number`<br/>
|
||||||
|
Returns the number of concurrent threads for uploading.
|
||||||
|
- **Returns** `number` - Number of concurrent threads (default 1)
|
||||||
- **getUploadPromise**(file: [`FileModel`](../../../lib/core/models/file.model.ts)): `any`<br/>
|
- **getUploadPromise**(file: [`FileModel`](../../../lib/core/models/file.model.ts)): `any`<br/>
|
||||||
Gets an upload promise for a file.
|
Gets an upload promise for a file.
|
||||||
- _file:_ [`FileModel`](../../../lib/core/models/file.model.ts) - The target file
|
- _file:_ [`FileModel`](../../../lib/core/models/file.model.ts) - The target file
|
||||||
@ -122,7 +127,7 @@ It is also possible to provide the `versioningEnabled` value as part of the [`Fi
|
|||||||
|
|
||||||
### Concurrent Uploads
|
### Concurrent Uploads
|
||||||
|
|
||||||
By default, the Upload Service processes one file at a time.
|
By default, the [Upload Service](../../core/services/upload.service.md) processes one file at a time.
|
||||||
You can increase the number of concurrent threads by changing the `upload.threads` configuration parameter:
|
You can increase the number of concurrent threads by changing the `upload.threads` configuration parameter:
|
||||||
|
|
||||||
**app.config.json**
|
**app.config.json**
|
||||||
|
@ -12,16 +12,18 @@ Checks the global and application access of a user
|
|||||||
## Class members
|
## Class members
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
- **fetchUserAccess**()<br/>
|
|
||||||
Fetches the global and application access of the user
|
- **fetchUserAccess**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<void>`<br/>
|
||||||
- **hasApplicationAccess**(appName: `string`, rolesToCheck: string[]): `boolean`<br/>
|
Fetches the global and application access of the user
|
||||||
Checks if the user has at least one of the roles to check for a given app.
|
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<void>` -
|
||||||
- appName: `string` - The name of the app
|
- **hasApplicationAccess**(appName: `string`, rolesToCheck: `string[]`): `boolean`<br/>
|
||||||
- rolesToCheck: `string[]` - The roles to check
|
Checks for global roles access.
|
||||||
- **Returns** `boolean` - True if it contains at least one of the given roles to check for the given app, false otherwise
|
- _appName:_ `string` - The app name
|
||||||
- **hasGlobalAccess**(rolesToCheck: string[]): `boolean`<br/>
|
- _rolesToCheck:_ `string[]` - List of the roles to check
|
||||||
Checks if the user has at least one of the given roles to check in the global roles.
|
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
|
||||||
- rolesToCheck: `string[]` - The roles to check
|
- **hasGlobalAccess**(rolesToCheck: `string[]`): `boolean`<br/>
|
||||||
- **Returns** `boolean` - True if it contains at least one of the given roles to check, false otherwise
|
Checks for global roles access.
|
||||||
- **resetAccess**() <br>
|
- _rolesToCheck:_ `string[]` - List of the roles to check
|
||||||
Resets the cached access of the user
|
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
|
||||||
|
- **resetAccess**()<br/>
|
||||||
|
Resets the cached user access
|
||||||
|
@ -22,10 +22,10 @@ Manages and runs basic extension functionality.
|
|||||||
Retrieves an action using its ID value.
|
Retrieves an action using its ID value.
|
||||||
- _id:_ `string` - The ID value to look for
|
- _id:_ `string` - The ID value to look for
|
||||||
- **Returns** [`ActionRef`](../../../lib/extensions/src/lib/config/action.extensions.ts) - Action or null if not found
|
- **Returns** [`ActionRef`](../../../lib/extensions/src/lib/config/action.extensions.ts) - Action or null if not found
|
||||||
- **getAuthGuards**(ids: `string[]`): `Array<Type<__type>>`<br/>
|
- **getAuthGuards**(ids: `string[]`): `Array<Type<any>>`<br/>
|
||||||
Retrieves one or more auth guards using an array of ID values.
|
Retrieves one or more auth guards using an array of ID values.
|
||||||
- _ids:_ `string[]` - Array of ID value to look for
|
- _ids:_ `string[]` - Array of ID value to look for
|
||||||
- **Returns** `Array<Type<__type>>` - Array of auth guards or empty array if none were found
|
- **Returns** `Array<Type<any>>` - Array of auth guards or empty array if none were found
|
||||||
- **getComponentById**(id: `string`): `Type<>`<br/>
|
- **getComponentById**(id: `string`): `Type<>`<br/>
|
||||||
Retrieves a registered [extension component](../../../lib/extensions/src/lib/services/component-register.service.ts) using its ID value.
|
Retrieves a registered [extension component](../../../lib/extensions/src/lib/services/component-register.service.ts) using its ID value.
|
||||||
- _id:_ `string` - The ID value to look for
|
- _id:_ `string` - The ID value to look for
|
||||||
@ -55,11 +55,11 @@ Manages and runs basic extension functionality.
|
|||||||
- **load**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<`[`ExtensionConfig`](../../../lib/extensions/src/lib/config/extension.config.ts)`>`<br/>
|
- **load**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<`[`ExtensionConfig`](../../../lib/extensions/src/lib/config/extension.config.ts)`>`<br/>
|
||||||
Loads and registers an extension config file and plugins (specified by path properties).
|
Loads and registers an extension config file and plugins (specified by path properties).
|
||||||
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<`[`ExtensionConfig`](../../../lib/extensions/src/lib/config/extension.config.ts)`>` - The loaded config data
|
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<`[`ExtensionConfig`](../../../lib/extensions/src/lib/config/extension.config.ts)`>` - The loaded config data
|
||||||
- **runExpression**(value: `string|__type`, context?: `any`): `Function`<br/>
|
- **runExpression**(value: `string|any`, context?: `any`): `any`<br/>
|
||||||
Runs a lightweight expression stored in a string.
|
Runs a lightweight expression stored in a string.
|
||||||
- _value:_ `string|__type` - String containing the expression or literal value
|
- _value:_ `string|any` - String containing the expression or literal value
|
||||||
- _context:_ `any` - (Optional) Parameter object for the expression with details of app state
|
- _context:_ `any` - (Optional) Parameter object for the expression with details of app state
|
||||||
- **Returns** `Function` - Result of evaluated expression, if found, or the literal value otherwise
|
- **Returns** `any` - Result of evaluated expression, if found, or the literal value otherwise
|
||||||
- **setAuthGuards**(values: `Function`)<br/>
|
- **setAuthGuards**(values: `Function`)<br/>
|
||||||
Adds one or more new auth guards to the existing set.
|
Adds one or more new auth guards to the existing set.
|
||||||
- _values:_ `Function` - The new auth guards to add
|
- _values:_ `Function` - The new auth guards to add
|
||||||
|
@ -23,7 +23,7 @@ Shows a list of all available reports
|
|||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| appId | `number` | | appId ID of the target app. |
|
| appId | `number` | | appId ID of the target app. |
|
||||||
| layoutType | `string` | | layout Type LIST or GRID. |
|
| layoutType | `string` | LAYOUT_LIST | layout Type LIST or GRID. |
|
||||||
| selectFirst | `boolean` | false | selectFirst. |
|
| selectFirst | `boolean` | false | selectFirst. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
@ -47,7 +47,7 @@ For example :
|
|||||||
|
|
||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| layoutType | `string` | | (**required**) Defines the layout of the apps. There are two possible values, "GRID" and "LIST". |
|
| layoutType | `string` | LAYOUT_GRID | (**required**) Defines the layout of the apps. There are two possible values, "GRID" and "LIST". |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ Shows/edits process filter details.
|
|||||||
|
|
||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| actions | `string[]` | | List of sort actions. |
|
| actions | `string[]` | DEFAULT_ACTIONS | List of sort actions. |
|
||||||
| appName | `string` | "" | The name of the application. |
|
| appName | `string` | "" | The name of the application. |
|
||||||
| filterProperties | `string[]` | | List of process filter properties to display |
|
| filterProperties | `string[]` | | List of process filter properties to display |
|
||||||
| id | `string` | | Id of the process instance filter. |
|
| id | `string` | | Id of the process instance filter. |
|
||||||
|
@ -46,7 +46,7 @@ Searches Groups.
|
|||||||
| roles | `string[]` | \[] | Role names of the groups to be listed. |
|
| roles | `string[]` | \[] | Role names of the groups to be listed. |
|
||||||
| searchGroupsControl | `FormControl` | | FormControl to search the group |
|
| searchGroupsControl | `FormControl` | | FormControl to search the group |
|
||||||
| title | `string` | | Title of the field |
|
| title | `string` | | Title of the field |
|
||||||
| validate | `boolean` | false | This flag enables the validation on the preSelectGroups passed as input. In case the flag is true the components call the [identity service](../../../lib/testing/src/lib/core/actions/identity/identity.service.ts) to verify the validity of the information passed as input. Otherwise, no check will be done. |
|
| validate | `boolean` | false | This flag enables the validation on the preSelectGroups passed as input. In case the flag is true the components call the identity service to verify the validity of the information passed as input. Otherwise, no check will be done. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ Allows one or more users to be selected (with auto-suggestion) based on the inpu
|
|||||||
| searchUserCtrl | `FormControl` | | FormControl to search the user |
|
| searchUserCtrl | `FormControl` | | FormControl to search the user |
|
||||||
| title | `string` | | Placeholder translation key |
|
| title | `string` | | Placeholder translation key |
|
||||||
| userChipsCtrl | `FormControl` | | FormControl to list of users |
|
| userChipsCtrl | `FormControl` | | FormControl to list of users |
|
||||||
| validate | `boolean` | false | This flag enables the validation on the preSelectUsers passed as input. In case the flag is true the components call the [identity service](../../../lib/testing/src/lib/core/actions/identity/identity.service.ts) to verify the validity of the information passed as input. Otherwise, no check will be done. |
|
| validate | `boolean` | false | This flag enables the validation on the preSelectUsers passed as input. In case the flag is true the components call the identity service to verify the validity of the information passed as input. Otherwise, no check will be done. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@ when the process list is empty:
|
|||||||
| selectionMode | `string` | "single" | Row selection mode. Can be "none", "single" or "multiple". For multiple mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
| selectionMode | `string` | "single" | Row selection mode. Can be "none", "single" or "multiple". For multiple mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||||
| showActions | `boolean` | false | Toggles the data actions column. |
|
| showActions | `boolean` | false | Toggles the data actions column. |
|
||||||
| showContextMenu | `boolean` | false | Toggles custom context menu for the component. |
|
| showContextMenu | `boolean` | false | Toggles custom context menu for the component. |
|
||||||
|
| showMainDatatableActions | `boolean` | false | Toggle main datatable actions. |
|
||||||
| sorting | [`ProcessListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/process/process-list/models/process-list-sorting.model.ts)`[]` | | Array of objects specifying the sort order and direction for the list. The sort parameters are for BE sorting. |
|
| sorting | [`ProcessListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/process/process-list/models/process-list-sorting.model.ts)`[]` | | Array of objects specifying the sort order and direction for the list. The sort parameters are for BE sorting. |
|
||||||
| startFrom | `string` | "" | Filter the processes. Display only process with startedDate greater then the supplied date. |
|
| startFrom | `string` | "" | Filter the processes. Display only process with startedDate greater then the supplied date. |
|
||||||
| startTo | `string` | "" | Filter the processes. Display only process with startedDate less than the supplied date. |
|
| startTo | `string` | "" | Filter the processes. Display only process with startedDate less than the supplied date. |
|
||||||
|
@ -37,12 +37,13 @@ Starts a process.
|
|||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| appName | `string` | "" | (required) Name of the app. |
|
| appName | `string` | "" | (required) Name of the app. |
|
||||||
| maxNameLength | `number` | | Maximum length of the process name. |
|
| maxNameLength | `number` | MAX_NAME_LENGTH | Maximum length of the process name. |
|
||||||
| name | `string` | "" | Name of the process. |
|
| name | `string` | "" | Name of the process. |
|
||||||
| processDefinitionName | `string` | | Name of the process definition. |
|
| processDefinitionName | `string` | | Name of the process definition. |
|
||||||
| showSelectProcessDropdown | `boolean` | true | Show/hide the process dropdown list. |
|
| showSelectProcessDropdown | `boolean` | true | Show/hide the process dropdown list. |
|
||||||
|
| showTitle | `boolean` | true | Show/hide title. |
|
||||||
| values | [`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]` | | Parameter to pass form field values in the start form if one is associated. |
|
| values | [`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]` | | Parameter to pass form field values in the start form if one is associated. |
|
||||||
| variables | `__type` | | Variables to attach to the payload. |
|
| variables | `any` | | Variables to attach to the payload. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Creates/starts a new task for the specified app.
|
|||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| appName | `string` | "" | (required) Name of the app. |
|
| appName | `string` | "" | (required) Name of the app. |
|
||||||
| maxNameLength | `number` | | Maximum length of the task name. |
|
| maxNameLength | `number` | MAX_NAME_LENGTH | Maximum length of the task name. |
|
||||||
| name | `string` | "" | Name of the task. |
|
| name | `string` | "" | Name of the task. |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
@ -80,7 +80,8 @@ when the task list is empty:
|
|||||||
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use the Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use the Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||||
| showActions | `boolean` | false | Toggles the data actions column. |
|
| showActions | `boolean` | false | Toggles the data actions column. |
|
||||||
| showContextMenu | `boolean` | false | Toggles custom context menu for the component. |
|
| showContextMenu | `boolean` | false | Toggles custom context menu for the component. |
|
||||||
| sorting | [`TaskListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/task/task-list/models/task-list-sorting.model.ts)`[]` | | Specifies how the table should be sorted. The parameters are for BE sorting. |
|
| showMainDatatableActions | `boolean` | false | Toggles main datatable actions. |
|
||||||
|
| sorting | [`TaskListCloudSortingModel`](../../../lib/process-services-cloud/src/lib/models/task-list-sorting.model.ts)`[]` | | Specifies how the table should be sorted. The parameters are for BE sorting. |
|
||||||
| standalone | `boolean` | false | Filter the tasks. Display only the tasks that belong to a process in case is false or tasks that doesn't belong to a process in case of true. |
|
| standalone | `boolean` | false | Filter the tasks. Display only the tasks that belong to a process in case is false or tasks that doesn't belong to a process in case of true. |
|
||||||
| status | `string` | "" | Filter the tasks. Display only tasks with status equal to the supplied value. |
|
| status | `string` | "" | Filter the tasks. Display only tasks with status equal to the supplied value. |
|
||||||
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
|
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
|
||||||
|
@ -34,22 +34,22 @@ Manage Process Filters, which are pre-configured Process Instance queries.
|
|||||||
Checks if given filter is a default filter
|
Checks if given filter is a default filter
|
||||||
- _filterName:_ `string` - Name of the target process filter
|
- _filterName:_ `string` - Name of the target process filter
|
||||||
- **Returns** `boolean` - Boolean value for whether the filter is a default filter
|
- **Returns** `boolean` - Boolean value for whether the filter is a default filter
|
||||||
- **readQueryParams**(obj: `Object`): [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)<br/>
|
- **readQueryParams**(obj: `any`): [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)<br/>
|
||||||
|
|
||||||
- _obj:_ `Object` -
|
- _obj:_ `any` -
|
||||||
- **Returns** [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts) -
|
- **Returns** [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts) -
|
||||||
|
|
||||||
- **updateFilter**(updatedFilter: [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`[]>`<br/>
|
- **updateFilter**(updatedFilter: [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`[]>`<br/>
|
||||||
Update process instance filter
|
Update process instance filter
|
||||||
- _updatedFilter:_ [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts) -
|
- _updatedFilter:_ [`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts) -
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`[]>` - Observable of process instance filters with updated filter
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessFilterCloudModel`](../../../lib/process-services-cloud/src/lib/process/process-filters/models/process-filter-cloud.model.ts)`[]>` - Observable of process instance filters with updated filter
|
||||||
- **writeQueryParams**(value: `Object`, filterProperties: `string[]`, appName?: `string`, id?: `string`): `Object`<br/>
|
- **writeQueryParams**(value: `any`, filterProperties: `string[]`, appName?: `string`, id?: `string`): `any`<br/>
|
||||||
|
|
||||||
- _value:_ `Object` -
|
- _value:_ `any` -
|
||||||
- _filterProperties:_ `string[]` -
|
- _filterProperties:_ `string[]` -
|
||||||
- _appName:_ `string` - (Optional)
|
- _appName:_ `string` - (Optional)
|
||||||
- _id:_ `string` - (Optional)
|
- _id:_ `string` - (Optional)
|
||||||
- **Returns** `Object` -
|
- **Returns** `any` -
|
||||||
|
|
||||||
## Inject Preference service
|
## Inject Preference service
|
||||||
|
|
||||||
|
@ -15,12 +15,12 @@ Gets process definitions and starts processes.
|
|||||||
|
|
||||||
- **createProcess**(appName: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
- **createProcess**(appName: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
||||||
Create a process based on a process definition, name, form values or variables.
|
Create a process based on a process definition, name, form values or variables.
|
||||||
- _appName:_ `string` - name of the [Application](../../../lib/testing/src/lib/core/structure/application.ts)
|
- _appName:_ `string` - name of the Application
|
||||||
- _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc)
|
- _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc)
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just created
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just created
|
||||||
- **deleteProcess**(appName: `string`, processInstanceId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<void>`<br/>
|
- **deleteProcess**(appName: `string`, processInstanceId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<void>`<br/>
|
||||||
Delete an existing process instance
|
Delete an existing process instance
|
||||||
- _appName:_ `string` - name of the [Application](../../../lib/testing/src/lib/core/structure/application.ts)
|
- _appName:_ `string` - name of the Application
|
||||||
- _processInstanceId:_ `string` - process instance to update
|
- _processInstanceId:_ `string` - process instance to update
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<void>` -
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<void>` -
|
||||||
- **getBasePath**(appName: `string`): `string`<br/>
|
- **getBasePath**(appName: `string`): `string`<br/>
|
||||||
@ -28,10 +28,16 @@ Gets process definitions and starts processes.
|
|||||||
- _appName:_ `string` -
|
- _appName:_ `string` -
|
||||||
- **Returns** `string` -
|
- **Returns** `string` -
|
||||||
|
|
||||||
- **getProcessDefinitions**(appName: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/models/process-definition-cloud.model.ts)`[]>`<br/>
|
- **getProcessDefinitions**(appName: `string`, queryParams?: `Function`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/models/process-definition-cloud.model.ts)`[]>`<br/>
|
||||||
Gets the process definitions associated with an app.
|
Gets the process definitions associated with an app.
|
||||||
- _appName:_ `string` - Name of the target app
|
- _appName:_ `string` - Name of the target app
|
||||||
|
- _queryParams:_ `Function` - (Optional)
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/models/process-definition-cloud.model.ts)`[]>` - Array of process definitions
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/models/process-definition-cloud.model.ts)`[]>` - Array of process definitions
|
||||||
|
- **getStartEventFormStaticValuesMapping**(appName: `string`, processDefinitionId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]>`<br/>
|
||||||
|
Gets the static values mapped to the start form of a process definition.
|
||||||
|
- _appName:_ `string` - Name of the app
|
||||||
|
- _processDefinitionId:_ `string` - ID of the target process definition
|
||||||
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]>` - Static mappings for the start event
|
||||||
- **startCreatedProcess**(appName: `string`, createdProcessInstanceId: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
- **startCreatedProcess**(appName: `string`, createdProcessInstanceId: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
||||||
Starts an already created process using the process instance id.
|
Starts an already created process using the process instance id.
|
||||||
- _appName:_ `string` -
|
- _appName:_ `string` -
|
||||||
@ -40,12 +46,12 @@ Gets process definitions and starts processes.
|
|||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started
|
||||||
- **startProcess**(appName: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
- **startProcess**(appName: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
||||||
Starts a process based on a process definition, name, form values or variables.
|
Starts a process based on a process definition, name, form values or variables.
|
||||||
- _appName:_ `string` - name of the [Application](../../../lib/testing/src/lib/core/structure/application.ts)
|
- _appName:_ `string` - name of the Application
|
||||||
- _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc)
|
- _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc)
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started
|
||||||
- **updateProcess**(appName: `string`, processInstanceId: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
- **updateProcess**(appName: `string`, processInstanceId: `string`, payload: [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>`<br/>
|
||||||
Update an existing process instance
|
Update an existing process instance
|
||||||
- _appName:_ `string` - name of the [Application](../../../lib/testing/src/lib/core/structure/application.ts)
|
- _appName:_ `string` - name of the Application
|
||||||
- _processInstanceId:_ `string` - process instance to update
|
- _processInstanceId:_ `string` - process instance to update
|
||||||
- _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc)
|
- _payload:_ [`ProcessPayloadCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-payload-cloud.model.ts) - Details of the process (definition key, name, variables, etc)
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` - Details of the process instance just started
|
||||||
|
@ -18,14 +18,14 @@ Searches tasks.
|
|||||||
- _appName:_ `string` -
|
- _appName:_ `string` -
|
||||||
- **Returns** `string` -
|
- **Returns** `string` -
|
||||||
|
|
||||||
- **getTaskByRequest**(requestNode: [`TaskQueryCloudRequestModel`](../../../lib/process-services-cloud/src/lib/task/task-list/models/filter-cloud-model.ts), queryUrl?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
- **getTaskByRequest**(requestNode: [`TaskQueryCloudRequestModel`](../../../lib/process-services-cloud/src/lib/models/filter-cloud-model.ts), queryUrl?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
|
||||||
Finds a task using an object with optional query properties.
|
Finds a task using an object with optional query properties.
|
||||||
- _requestNode:_ [`TaskQueryCloudRequestModel`](../../../lib/process-services-cloud/src/lib/task/task-list/models/filter-cloud-model.ts) - Query object
|
- _requestNode:_ [`TaskQueryCloudRequestModel`](../../../lib/process-services-cloud/src/lib/models/filter-cloud-model.ts) - Query object
|
||||||
- _queryUrl:_ `string` - (Optional) Query url
|
- _queryUrl:_ `string` - (Optional) Query url
|
||||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Task information
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Task information
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
Note that for a call to `getTaskByRequest`, the
|
Note that for a call to `getTaskByRequest`, the
|
||||||
[`TaskQueryCloudRequestModel`](../../../lib/process-services-cloud/src/lib/task/task-list/models/filter-cloud-model.ts) object
|
[`TaskQueryCloudRequestModel`](../../../lib/process-services-cloud/src/lib/models/filter-cloud-model.ts) object
|
||||||
must at minimum have the `appName` property correctly set.
|
must at minimum have the `appName` property correctly set.
|
||||||
|
@ -56,7 +56,7 @@ when the process list is empty:
|
|||||||
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row |
|
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row |
|
||||||
| page | `number` | 0 | The page number of the processes to fetch. |
|
| page | `number` | 0 | The page number of the processes to fetch. |
|
||||||
| presetColumn | `string` | | Custom preset column schema in JSON format. |
|
| presetColumn | `string` | | Custom preset column schema in JSON format. |
|
||||||
| processDefinitionId | `string` | | The [Definition](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/definition.ts) Id of the process. |
|
| processDefinitionId | `string` | | The Definition Id of the process. |
|
||||||
| processInstanceId | `number \| string` | | The id of the process instance. |
|
| processInstanceId | `number \| string` | | The id of the process instance. |
|
||||||
| resolverFn | `Function` | null | Resolver function is used to show dynamic complex column objects see the docs to learn how to configure a resolverFn. |
|
| resolverFn | `Function` | null | Resolver function is used to show dynamic complex column objects see the docs to learn how to configure a resolverFn. |
|
||||||
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
|
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
|
||||||
|
@ -42,7 +42,7 @@ Starts a process.
|
|||||||
| ---- | ---- | ------------- | ----------- |
|
| ---- | ---- | ------------- | ----------- |
|
||||||
| appId | `number` | | (optional) Limit the list of processes that can be started to those contained in the specified app. |
|
| appId | `number` | | (optional) Limit the list of processes that can be started to those contained in the specified app. |
|
||||||
| name | `string` | "" | (optional) Name to assign to the current process. |
|
| name | `string` | "" | (optional) Name to assign to the current process. |
|
||||||
| processDefinitionName | `string` | | (optional) [Definition](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/definition.ts) name of the process to start. |
|
| processDefinitionName | `string` | | (optional) Definition name of the process to start. |
|
||||||
| processFilterSelector | `boolean` | true | (optional) Parameter to enable selection of process when filtering. |
|
| processFilterSelector | `boolean` | true | (optional) Parameter to enable selection of process when filtering. |
|
||||||
| showSelectApplicationDropdown | `boolean` | false | (optional) Hide or show application selection dropdown. |
|
| showSelectApplicationDropdown | `boolean` | false | (optional) Hide or show application selection dropdown. |
|
||||||
| showSelectProcessDropdown | `boolean` | true | Hide or show the process selection dropdown. |
|
| showSelectProcessDropdown | `boolean` | true | Hide or show the process selection dropdown. |
|
||||||
|
@ -64,7 +64,7 @@ when the task list is empty:
|
|||||||
| name | `string` | | Name of the tasklist. |
|
| name | `string` | | Name of the tasklist. |
|
||||||
| page | `number` | 0 | The page number of the tasks to fetch. |
|
| page | `number` | 0 | The page number of the tasks to fetch. |
|
||||||
| presetColumn | `string` | | Custom preset column schema in JSON format. |
|
| presetColumn | `string` | | Custom preset column schema in JSON format. |
|
||||||
| processDefinitionId | `string` | | The [Definition](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/definition.ts) Id of the process. |
|
| processDefinitionId | `string` | | The Definition Id of the process. |
|
||||||
| processInstanceId | `string` | | The Instance Id of the process. |
|
| processInstanceId | `string` | | The Instance Id of the process. |
|
||||||
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
|
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
|
||||||
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||||
|
@ -149,7 +149,7 @@ describe('ColumnsSelectorComponent', () => {
|
|||||||
const firstColumnCheckbox = await loader.getHarness(MatCheckboxHarness);
|
const firstColumnCheckbox = await loader.getHarness(MatCheckboxHarness);
|
||||||
const checkBoxName = await firstColumnCheckbox.getLabelText();
|
const checkBoxName = await firstColumnCheckbox.getLabelText();
|
||||||
|
|
||||||
let toggledColumnItem = component.columnItems.find(item => item.title === checkBoxName);
|
const toggledColumnItem = component.columnItems.find(item => item.title === checkBoxName);
|
||||||
expect(toggledColumnItem.isHidden).toBeFalsy();
|
expect(toggledColumnItem.isHidden).toBeFalsy();
|
||||||
|
|
||||||
await firstColumnCheckbox.toggle();
|
await firstColumnCheckbox.toggle();
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import { EcmCompanyModel } from '../models/ecm-company.model';
|
import { EcmCompanyModel } from '../models/ecm-company.model';
|
||||||
import { PersonEntry, Person, PersonPaging } from '@alfresco/js-api';
|
import { PersonEntry, Person, PersonPaging } from '@alfresco/js-api';
|
||||||
import { EcmUserModel } from '../models';
|
|
||||||
|
|
||||||
export const fakeEcmCompany: EcmCompanyModel = {
|
export const fakeEcmCompany: EcmCompanyModel = {
|
||||||
organization: 'company-fake-name',
|
organization: 'company-fake-name',
|
||||||
@ -30,7 +29,7 @@ export const fakeEcmCompany: EcmCompanyModel = {
|
|||||||
email: 'fakeCompany@fake.com'
|
email: 'fakeCompany@fake.com'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fakeEcmUser = new EcmUserModel({
|
export const fakeEcmUser = {
|
||||||
id: 'fake-id',
|
id: 'fake-id',
|
||||||
firstName: 'fake-ecm-first-name',
|
firstName: 'fake-ecm-first-name',
|
||||||
lastName: 'fake-ecm-last-name',
|
lastName: 'fake-ecm-last-name',
|
||||||
@ -49,7 +48,14 @@ export const fakeEcmUser = new EcmUserModel({
|
|||||||
userStatus: 'active',
|
userStatus: 'active',
|
||||||
enabled: true,
|
enabled: true,
|
||||||
emailNotificationsEnabled: true
|
emailNotificationsEnabled: true
|
||||||
});
|
};
|
||||||
|
|
||||||
|
export const fakeEcmAdminUser = {
|
||||||
|
...fakeEcmUser,
|
||||||
|
capabilities: {
|
||||||
|
isAdmin: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export const fakeEcmUser2 = {
|
export const fakeEcmUser2 = {
|
||||||
id: 'another-fake-id',
|
id: 'another-fake-id',
|
||||||
|
@ -65,4 +65,8 @@ export class EcmUserModel {
|
|||||||
this.properties = obj && obj.properties;
|
this.properties = obj && obj.properties;
|
||||||
this.capabilities = obj && obj.capabilities;
|
this.capabilities = obj && obj.capabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isAdmin(): boolean {
|
||||||
|
return this.capabilities?.isAdmin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,10 +24,8 @@ import { JwtHelperService } from './jwt-helper.service';
|
|||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { PeopleContentService } from './people-content.service';
|
import { PeopleContentService } from './people-content.service';
|
||||||
import { of } from 'rxjs';
|
|
||||||
import { getFakeUserWithContentAdminCapability, getFakeUserWithContentUserCapability } from '../mock/ecm-user.service.mock';
|
|
||||||
import { UserAccessService } from './user-access.service';
|
import { UserAccessService } from './user-access.service';
|
||||||
import { AppConfigService } from '../app-config/app-config.service';
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
describe('Auth Guard SSO role service', () => {
|
describe('Auth Guard SSO role service', () => {
|
||||||
|
|
||||||
@ -36,7 +34,6 @@ describe('Auth Guard SSO role service', () => {
|
|||||||
let routerService: Router;
|
let routerService: Router;
|
||||||
let peopleContentService: PeopleContentService;
|
let peopleContentService: PeopleContentService;
|
||||||
let userAccessService: UserAccessService;
|
let userAccessService: UserAccessService;
|
||||||
let appConfig: AppConfigService;
|
|
||||||
|
|
||||||
setupTestBed({
|
setupTestBed({
|
||||||
imports: [
|
imports: [
|
||||||
@ -46,8 +43,6 @@ describe('Auth Guard SSO role service', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
appConfig = TestBed.inject(AppConfigService);
|
|
||||||
appConfig.config.providers = 'ECM';
|
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
authGuard = TestBed.inject(AuthGuardSsoRoleService);
|
authGuard = TestBed.inject(AuthGuardSsoRoleService);
|
||||||
jwtHelperService = TestBed.inject(JwtHelperService);
|
jwtHelperService = TestBed.inject(JwtHelperService);
|
||||||
@ -186,76 +181,51 @@ describe('Auth Guard SSO role service', () => {
|
|||||||
|
|
||||||
describe('Content Admin', () => {
|
describe('Content Admin', () => {
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
peopleContentService.hasCheckedIsContentAdmin = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Should give access to a content section (ALFRESCO_ADMINISTRATORS) when the user has content admin capability', async () => {
|
it('Should give access to a content section (ALFRESCO_ADMINISTRATORS) when the user has content admin capability', async () => {
|
||||||
spyOn(peopleContentService, 'getCurrentPerson').and.returnValue(of(getFakeUserWithContentAdminCapability()));
|
spyOn(peopleContentService, 'getCurrentUserInfo').and.returnValue(of({}));
|
||||||
|
spyOn(peopleContentService, 'isCurrentUserAdmin').and.returnValue(true);
|
||||||
|
|
||||||
spyUserAccess([], {});
|
spyUserAccess([], {});
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
||||||
|
|
||||||
expect(await authGuard.canActivate(router)).toBeTruthy();
|
expect(await authGuard.canActivate(router)).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should not give access to a content section (ALFRESCO_ADMINISTRATORS) when the user does not have content admin capability', async () => {
|
it('Should not give access to a content section (ALFRESCO_ADMINISTRATORS) when the user does not have content admin capability', async () => {
|
||||||
spyOn(peopleContentService, 'getCurrentPerson').and.returnValue(of(getFakeUserWithContentUserCapability()));
|
spyOn(peopleContentService, 'getCurrentUserInfo').and.returnValue(of({}));
|
||||||
|
spyOn(peopleContentService, 'isCurrentUserAdmin').and.returnValue(false);
|
||||||
|
|
||||||
spyUserAccess([], {});
|
spyUserAccess([], {});
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
||||||
|
|
||||||
expect(await authGuard.canActivate(router)).toBeFalsy();
|
expect(await authGuard.canActivate(router)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should not call the service to check if the user has content admin capability when the roles do not contain ALFRESCO_ADMINISTRATORS', async () => {
|
it('Should not call the service to check if the user has content admin capability when the roles do not contain ALFRESCO_ADMINISTRATORS', async () => {
|
||||||
const getCurrentPersonSpy = spyOn(peopleContentService, 'getCurrentPerson').and.returnValue(of(getFakeUserWithContentAdminCapability()));
|
const isCurrentAdminSpy = spyOn(peopleContentService, 'isCurrentUserAdmin').and.stub();
|
||||||
spyUserAccess([], {});
|
spyUserAccess([], {});
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
router.data = { roles: ['fakeRole'] };
|
router.data = { roles: ['fakeRole'] };
|
||||||
|
|
||||||
await authGuard.canActivate(router);
|
await authGuard.canActivate(router);
|
||||||
|
|
||||||
expect(getCurrentPersonSpy).not.toHaveBeenCalled();
|
expect(isCurrentAdminSpy).not.toHaveBeenCalled();
|
||||||
});
|
|
||||||
|
|
||||||
it('Should not retrieve the user when the provider is BPM', async () => {
|
|
||||||
spyUserAccess([], {});
|
|
||||||
spyOn(peopleContentService, 'getCurrentPerson');
|
|
||||||
appConfig.config.providers = 'BPM';
|
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
|
||||||
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
|
||||||
|
|
||||||
const result = await authGuard.canActivate(router);
|
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
|
||||||
expect(peopleContentService.getCurrentPerson).not.toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('Should not fail when the people service throws an error', async () => {
|
|
||||||
spyUserAccess([], {});
|
|
||||||
spyOn(peopleContentService, 'getCurrentPerson').and.throwError('404 Not found');
|
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
|
||||||
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'] };
|
|
||||||
|
|
||||||
const result = await authGuard.canActivate(router);
|
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
|
||||||
expect(peopleContentService.getCurrentPerson).toHaveBeenCalled();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Excluded Roles', () => {
|
describe('Excluded Roles', () => {
|
||||||
it('Should canActivate be false when the user has one of the excluded roles', async () => {
|
it('Should canActivate be false when the user has one of the excluded roles', async () => {
|
||||||
spyOn(peopleContentService, 'getCurrentPerson').and.returnValue(of(getFakeUserWithContentAdminCapability()));
|
|
||||||
spyUserAccess(['MOCK_USER_ROLE'], {});
|
spyUserAccess(['MOCK_USER_ROLE'], {});
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'], excludedRoles: ['MOCK_USER_ROLE'] };
|
router.data = { roles: ['MOCK_ANOTHER_ROLE'], excludedRoles: ['MOCK_USER_ROLE'] };
|
||||||
|
|
||||||
expect(await authGuard.canActivate(router)).toBeFalsy();
|
expect(await authGuard.canActivate(router)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should canActivate be true when the user has none of the excluded roles', async () => {
|
it('Should canActivate be true when the user has none of the excluded roles', async () => {
|
||||||
@ -263,18 +233,31 @@ describe('Auth Guard SSO role service', () => {
|
|||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
router.data = { roles: ['MOCK_USER_ROLE', 'MOCK_ADMIN_ROLE'], excludedRoles: ['MOCK_ROOT_USER_ROLE'] };
|
router.data = { roles: ['MOCK_USER_ROLE', 'MOCK_ADMIN_ROLE'], excludedRoles: ['MOCK_ROOT_USER_ROLE'] };
|
||||||
|
const result = await authGuard.canActivate(router);
|
||||||
expect(await authGuard.canActivate(router)).toBeTruthy();
|
expect(result).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should canActivate be false when the user is a content admin and the ALFRESCO_ADMINISTRATORS role is excluded', async () => {
|
it('Should canActivate be true when the user has none of the excluded role and is not a content admin', async () => {
|
||||||
spyOn(peopleContentService, 'getCurrentPerson').and.returnValue(of(getFakeUserWithContentAdminCapability()));
|
spyOn(peopleContentService, 'getCurrentUserInfo').and.returnValue(of({}));
|
||||||
|
spyOn(peopleContentService, 'isCurrentUserAdmin').and.returnValue(false);
|
||||||
spyUserAccess(['MOCK_USER_ROLE'], {});
|
spyUserAccess(['MOCK_USER_ROLE'], {});
|
||||||
|
|
||||||
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
router.data = { roles: ['MOCK_USER_ROLE'], excludedRoles: ['ALFRESCO_ADMINISTRATORS'] };
|
router.data = { roles: ['MOCK_USER_ROLE'], excludedRoles: ['ALFRESCO_ADMINISTRATORS'] };
|
||||||
|
|
||||||
expect(await authGuard.canActivate(router)).toBeFalsy();
|
expect(await authGuard.canActivate(router)).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should canActivate be false if the user is a content admin but has one of the excluded roles', async () => {
|
||||||
|
const isCurrentAdminSpy = spyOn(peopleContentService, 'getCurrentUserInfo').and.returnValue(of({}));
|
||||||
|
spyOn(peopleContentService, 'isCurrentUserAdmin').and.returnValue(true);
|
||||||
|
spyUserAccess(['MOCK_USER_ROLE'], {});
|
||||||
|
|
||||||
|
const router: ActivatedRouteSnapshot = new ActivatedRouteSnapshot();
|
||||||
|
router.data = { roles: ['ALFRESCO_ADMINISTRATORS'], excludedRoles: ['MOCK_USER_ROLE'] };
|
||||||
|
|
||||||
|
expect(await authGuard.canActivate(router)).toBe(false);
|
||||||
|
expect(isCurrentAdminSpy).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,6 @@ import { ActivatedRouteSnapshot, CanActivate, Router } from '@angular/router';
|
|||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { ContentGroups, PeopleContentService } from './people-content.service';
|
import { ContentGroups, PeopleContentService } from './people-content.service';
|
||||||
import { UserAccessService } from './user-access.service';
|
import { UserAccessService } from './user-access.service';
|
||||||
import { AppConfigService } from '../app-config/app-config.service';
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -29,15 +28,13 @@ export class AuthGuardSsoRoleService implements CanActivate {
|
|||||||
constructor(private userAccessService: UserAccessService,
|
constructor(private userAccessService: UserAccessService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private dialog: MatDialog,
|
private dialog: MatDialog,
|
||||||
private peopleContentService: PeopleContentService,
|
private peopleContentService: PeopleContentService) {
|
||||||
private appConfig: AppConfigService) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async canActivate(route: ActivatedRouteSnapshot): Promise<boolean> {
|
async canActivate(route: ActivatedRouteSnapshot): Promise<boolean> {
|
||||||
await this.userAccessService.fetchUserAccess();
|
await this.userAccessService.fetchUserAccess();
|
||||||
let hasRealmRole = false;
|
let hasRealmRole = false;
|
||||||
let hasClientRole = true;
|
let hasClientRole = true;
|
||||||
|
|
||||||
if (route.data) {
|
if (route.data) {
|
||||||
if (route.data['roles']) {
|
if (route.data['roles']) {
|
||||||
const rolesToCheck: string[] = route.data['roles'];
|
const rolesToCheck: string[] = route.data['roles'];
|
||||||
@ -45,11 +42,7 @@ export class AuthGuardSsoRoleService implements CanActivate {
|
|||||||
hasRealmRole = true;
|
hasRealmRole = true;
|
||||||
} else {
|
} else {
|
||||||
const excludedRoles = route.data['excludedRoles'] || [];
|
const excludedRoles = route.data['excludedRoles'] || [];
|
||||||
let isContentAdmin = false;
|
hasRealmRole = await this.validateRoles(rolesToCheck, excludedRoles);
|
||||||
if (this.checkContentAdministratorRole(rolesToCheck, excludedRoles)) {
|
|
||||||
isContentAdmin = await this.peopleContentService.isContentAdmin().catch(() => false);
|
|
||||||
}
|
|
||||||
hasRealmRole = excludedRoles.length ? this.checkAccessWithExcludedRoles(rolesToCheck, excludedRoles, isContentAdmin) : this.hasRoles(rolesToCheck, isContentAdmin);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +52,6 @@ export class AuthGuardSsoRoleService implements CanActivate {
|
|||||||
hasClientRole = this.userAccessService.hasApplicationAccess(clientRoleName, rolesToCheck);
|
hasClientRole = this.userAccessService.hasApplicationAccess(clientRoleName, rolesToCheck);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const hasRole = hasRealmRole && hasClientRole;
|
const hasRole = hasRealmRole && hasClientRole;
|
||||||
|
|
||||||
if (!hasRole && route?.data && route.data['redirectUrl']) {
|
if (!hasRole && route?.data && route.data['redirectUrl']) {
|
||||||
@ -73,19 +65,23 @@ export class AuthGuardSsoRoleService implements CanActivate {
|
|||||||
return hasRole;
|
return hasRole;
|
||||||
}
|
}
|
||||||
|
|
||||||
private checkContentAdministratorRole(rolesToCheck: string[], excludedRoles: string[]): boolean {
|
private async validateRoles(rolesToCheck: string[], excludedRoles?: string[]): Promise<boolean> {
|
||||||
const hasContentProvider = this.appConfig.config.providers === 'ECM' || this.appConfig.config.providers === 'ALL';
|
if (excludedRoles?.length > 0) {
|
||||||
const checkAdminRole = rolesToCheck.includes(ContentGroups.ALFRESCO_ADMINISTRATORS) || excludedRoles.includes(ContentGroups.ALFRESCO_ADMINISTRATORS);
|
return await this.hasRoles(rolesToCheck) && !await this.hasRoles(excludedRoles);
|
||||||
return hasContentProvider && checkAdminRole;
|
}
|
||||||
|
return this.hasRoles(rolesToCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
private checkAccessWithExcludedRoles(rolesToCheck: string[], excludedRoles: string[], isContentAdmin: boolean): boolean {
|
private async hasRoles(roles: string[] = []): Promise<boolean> {
|
||||||
return this.hasRoles(rolesToCheck, isContentAdmin) && !this.hasRoles(excludedRoles, isContentAdmin);
|
if (this.containsAlfrescoAdminRole(roles)) {
|
||||||
|
await this.peopleContentService.getCurrentUserInfo().toPromise();
|
||||||
|
return this.peopleContentService.isCurrentUserAdmin() || this.userAccessService.hasGlobalAccess(roles);
|
||||||
|
}
|
||||||
|
return this.userAccessService.hasGlobalAccess(roles);
|
||||||
}
|
}
|
||||||
|
|
||||||
private hasRoles(rolesToCheck: string[], isContentAdmin: boolean): boolean {
|
private containsAlfrescoAdminRole(roles: string []): boolean {
|
||||||
return rolesToCheck.includes(ContentGroups.ALFRESCO_ADMINISTRATORS)
|
return roles.includes(ContentGroups.ALFRESCO_ADMINISTRATORS);
|
||||||
? this.userAccessService.hasGlobalAccess(rolesToCheck) || isContentAdmin
|
|
||||||
: this.userAccessService.hasGlobalAccess(rolesToCheck);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,16 +15,16 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { fakeEcmUser, fakeEcmUserList, createNewPersonMock, getFakeUserWithContentAdminCapability } from '../mock/ecm-user.service.mock';
|
import { fakeEcmUserList, createNewPersonMock, fakeEcmUser, fakeEcmAdminUser } from '../mock/ecm-user.service.mock';
|
||||||
import { AlfrescoApiServiceMock } from '../mock/alfresco-api.service.mock';
|
import { AlfrescoApiServiceMock } from '../mock/alfresco-api.service.mock';
|
||||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||||
import { PeopleContentService, PeopleContentQueryResponse, PeopleContentQueryRequestModel } from './people-content.service';
|
import { PeopleContentService, PeopleContentQueryRequestModel } from './people-content.service';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
import { PersonEntry } from '@alfresco/js-api';
|
|
||||||
import { AuthenticationService } from './authentication.service';
|
import { AuthenticationService } from './authentication.service';
|
||||||
|
import { of } from 'rxjs';
|
||||||
|
|
||||||
describe('PeopleContentService', () => {
|
describe('PeopleContentService', () => {
|
||||||
|
|
||||||
@ -48,58 +48,31 @@ describe('PeopleContentService', () => {
|
|||||||
logService = TestBed.inject(LogService);
|
logService = TestBed.inject(LogService);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to fetch person details based on id', (done) => {
|
it('should be able to fetch person details based on id', async () => {
|
||||||
spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(Promise.resolve(new PersonEntry({ entry: fakeEcmUser })));
|
spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(of({entry: fakeEcmUser }));
|
||||||
peopleContentService.getPerson('fake-id').subscribe((person) => {
|
const person = await peopleContentService.getPerson('fake-id').toPromise();
|
||||||
expect(person.entry.id).toEqual('fake-id');
|
expect(person.id).toEqual('fake-id');
|
||||||
expect(person.entry.email).toEqual('fakeEcm@ecmUser.com');
|
expect(person.email).toEqual('fakeEcm@ecmUser.com');
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calls getPerson api method by an id', (done) => {
|
it('should be able to list people', async () => {
|
||||||
const getPersonSpy = spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(Promise.resolve(null));
|
spyOn(peopleContentService.peopleApi, 'listPeople').and.returnValue(of(fakeEcmUserList));
|
||||||
peopleContentService.getPerson('fake-id').subscribe(() => {
|
const response = await peopleContentService.listPeople().toPromise();
|
||||||
expect(getPersonSpy).toHaveBeenCalledWith('fake-id');
|
const people = response.entries;
|
||||||
done();
|
const pagination = response.pagination;
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('calls getPerson api method with "-me-"', (done) => {
|
expect(people).toBeDefined();
|
||||||
const getPersonSpy = spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(Promise.resolve(null));
|
expect(people[0].id).toEqual('fake-id');
|
||||||
peopleContentService.getPerson('-me-').subscribe(() => {
|
expect(people[1].id).toEqual('another-fake-id');
|
||||||
expect(getPersonSpy).toHaveBeenCalledWith('-me-');
|
expect(pagination.count).toEqual(2);
|
||||||
done();
|
expect(pagination.totalItems).toEqual(2);
|
||||||
});
|
expect(pagination.hasMoreItems).toBeFalsy();
|
||||||
});
|
expect(pagination.skipCount).toEqual(0);
|
||||||
|
|
||||||
it('should be able to list people', (done) => {
|
|
||||||
spyOn(peopleContentService.peopleApi, 'listPeople').and.returnValue(Promise.resolve(fakeEcmUserList));
|
|
||||||
peopleContentService.listPeople().subscribe((response: PeopleContentQueryResponse) => {
|
|
||||||
const people = response.entries;
|
|
||||||
const pagination = response.pagination;
|
|
||||||
|
|
||||||
expect(people).toBeDefined();
|
|
||||||
expect(people[0].id).toEqual('fake-id');
|
|
||||||
expect(people[1].id).toEqual('another-fake-id');
|
|
||||||
expect(pagination.count).toEqual(2);
|
|
||||||
expect(pagination.totalItems).toEqual(2);
|
|
||||||
expect(pagination.hasMoreItems).toBeFalsy();
|
|
||||||
expect(pagination.skipCount).toEqual(0);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should call listPeople api method', (done) => {
|
|
||||||
const listPeopleSpy = spyOn(peopleContentService.peopleApi, 'listPeople').and.returnValue(Promise.resolve(fakeEcmUserList));
|
|
||||||
peopleContentService.listPeople().subscribe(() => {
|
|
||||||
expect(listPeopleSpy).toHaveBeenCalled();
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call listPeople api with requested sorting params', async () => {
|
it('should call listPeople api with requested sorting params', async () => {
|
||||||
const listPeopleSpy = spyOn(peopleContentService.peopleApi, 'listPeople').and.returnValue(Promise.resolve(fakeEcmUserList));
|
const listPeopleSpy = spyOn(peopleContentService.peopleApi, 'listPeople').and.returnValue(of(fakeEcmUserList));
|
||||||
const requestQueryParams: PeopleContentQueryRequestModel = { skipCount: 10, maxItems: 20, sorting: { orderBy: 'firstName', direction: 'asc' } };
|
const requestQueryParams: PeopleContentQueryRequestModel = { skipCount: 10, maxItems: 20, sorting: { orderBy: 'firstName', direction: 'asc' } };
|
||||||
const expectedValue = { skipCount: 10, maxItems: 20, orderBy: ['firstName ASC'] };
|
const expectedValue = { skipCount: 10, maxItems: 20, orderBy: ['firstName ASC'] };
|
||||||
|
|
||||||
@ -109,7 +82,7 @@ describe('PeopleContentService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should not call listPeople api with sorting params if sorting is not defined', async () => {
|
it('should not call listPeople api with sorting params if sorting is not defined', async () => {
|
||||||
const listPeopleSpy = spyOn(peopleContentService.peopleApi, 'listPeople').and.returnValue(Promise.resolve(fakeEcmUserList));
|
const listPeopleSpy = spyOn(peopleContentService.peopleApi, 'listPeople').and.returnValue(of(fakeEcmUserList));
|
||||||
const requestQueryParams: PeopleContentQueryRequestModel = { skipCount: 10, maxItems: 20, sorting: undefined };
|
const requestQueryParams: PeopleContentQueryRequestModel = { skipCount: 10, maxItems: 20, sorting: undefined };
|
||||||
const expectedValue = { skipCount: 10, maxItems: 20 };
|
const expectedValue = { skipCount: 10, maxItems: 20 };
|
||||||
|
|
||||||
@ -118,60 +91,48 @@ describe('PeopleContentService', () => {
|
|||||||
expect(listPeopleSpy).toHaveBeenCalledWith(expectedValue);
|
expect(listPeopleSpy).toHaveBeenCalledWith(expectedValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to create new person', (done) => {
|
it('should be able to create new person', async () => {
|
||||||
spyOn(peopleContentService.peopleApi, 'createPerson').and.returnValue(Promise.resolve(new PersonEntry({ entry: fakeEcmUser })));
|
spyOn(peopleContentService.peopleApi, 'createPerson').and.returnValue(of({entry: fakeEcmUser }));
|
||||||
peopleContentService.createPerson(createNewPersonMock).subscribe((person) => {
|
const newUser = await peopleContentService.createPerson(createNewPersonMock).toPromise();
|
||||||
expect(person.id).toEqual('fake-id');
|
expect(newUser.id).toEqual('fake-id');
|
||||||
expect(person.email).toEqual('fakeEcm@ecmUser.com');
|
expect(newUser.email).toEqual('fakeEcm@ecmUser.com');
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should be able to call createPerson api with new person details', (done) => {
|
|
||||||
const createPersonSpy = spyOn(peopleContentService.peopleApi, 'createPerson').and.returnValue(Promise.resolve(new PersonEntry({ entry: fakeEcmUser })));
|
|
||||||
peopleContentService.createPerson(createNewPersonMock).subscribe((person) => {
|
|
||||||
expect(person.id).toEqual('fake-id');
|
|
||||||
expect(person.email).toEqual('fakeEcm@ecmUser.com');
|
|
||||||
expect(createPersonSpy).toHaveBeenCalledWith(createNewPersonMock, undefined);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to throw an error if createPerson api failed', (done) => {
|
it('should be able to throw an error if createPerson api failed', (done) => {
|
||||||
const createPersonSpy = spyOn(peopleContentService.peopleApi, 'createPerson').and.returnValue(Promise.reject({ message: 'failed to create new person' }));
|
spyOn(peopleContentService.peopleApi, 'createPerson').and.returnValue(Promise.reject('failed to create new person'));
|
||||||
const logErrorSpy = spyOn(logService, 'error');
|
const logErrorSpy = spyOn(logService, 'error');
|
||||||
peopleContentService.createPerson(createNewPersonMock).subscribe(
|
peopleContentService.createPerson(createNewPersonMock).subscribe(
|
||||||
() => {},
|
() => {},
|
||||||
(error) => {
|
(error) => {
|
||||||
expect(error).toEqual({ message: 'failed to create new person' });
|
expect(logErrorSpy).toHaveBeenCalledWith('failed to create new person');
|
||||||
expect(createPersonSpy).toHaveBeenCalled();
|
expect(error).toEqual('failed to create new person');
|
||||||
expect(logErrorSpy).toHaveBeenCalledWith({ message: 'failed to create new person' });
|
done();
|
||||||
done();
|
}
|
||||||
});
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should make the api call to check if the user is a content admin only once', async () => {
|
it('Should make the api call to check if the user is a content admin only once', async () => {
|
||||||
const getCurrentPersonSpy = spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(Promise.resolve(getFakeUserWithContentAdminCapability()));
|
const getCurrentPersonSpy = spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(of({entry: fakeEcmAdminUser}));
|
||||||
|
|
||||||
expect(await peopleContentService.isContentAdmin()).toBe(true);
|
const user = await peopleContentService.getCurrentUserInfo().toPromise();
|
||||||
|
expect(user.id).toEqual('fake-id');
|
||||||
|
expect(peopleContentService.isCurrentUserAdmin()).toBe(true);
|
||||||
expect(getCurrentPersonSpy.calls.count()).toEqual(1);
|
expect(getCurrentPersonSpy.calls.count()).toEqual(1);
|
||||||
|
|
||||||
await peopleContentService.isContentAdmin();
|
await peopleContentService.getCurrentUserInfo().toPromise();
|
||||||
|
|
||||||
expect(await peopleContentService.isContentAdmin()).toBe(true);
|
expect(await peopleContentService.isCurrentUserAdmin()).toBe(true);
|
||||||
expect(getCurrentPersonSpy.calls.count()).toEqual(1);
|
expect(getCurrentPersonSpy.calls.count()).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reset the admin cache upon logout', async () => {
|
it('should reset the admin cache upon logout', async () => {
|
||||||
const getCurrentPersonSpy = spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(Promise.resolve(getFakeUserWithContentAdminCapability()));
|
spyOn(peopleContentService.peopleApi, 'getPerson').and.returnValue(of({entry: fakeEcmAdminUser}));
|
||||||
|
|
||||||
expect(await peopleContentService.isContentAdmin()).toBeTruthy();
|
const user = await peopleContentService.getCurrentUserInfo().toPromise();
|
||||||
expect(peopleContentService.hasCheckedIsContentAdmin).toBeTruthy();
|
expect(user.id).toEqual('fake-id');
|
||||||
|
expect(peopleContentService.isCurrentUserAdmin()).toBe(true);
|
||||||
|
|
||||||
authenticationService.onLogout.next(true);
|
authenticationService.onLogout.next(true);
|
||||||
expect(peopleContentService.hasCheckedIsContentAdmin).toBeFalsy();
|
expect(peopleContentService.isCurrentUserAdmin()).toBe(false);
|
||||||
|
|
||||||
expect(await peopleContentService.isContentAdmin()).toBe(true);
|
|
||||||
expect(getCurrentPersonSpy.calls.count()).toEqual(2);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -16,13 +16,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, from, throwError } from 'rxjs';
|
import { Observable, from, throwError, of } from 'rxjs';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map, tap } from 'rxjs/operators';
|
||||||
import { PersonEntry, PeopleApi, PersonBodyCreate, Pagination, PersonBodyUpdate } from '@alfresco/js-api';
|
import { PeopleApi, PersonBodyCreate, Pagination, PersonBodyUpdate } from '@alfresco/js-api';
|
||||||
import { EcmUserModel } from '../models/ecm-user.model';
|
import { EcmUserModel } from '../models/ecm-user.model';
|
||||||
import { LogService } from './log.service';
|
import { LogService } from './log.service';
|
||||||
import { AuthenticationService } from './authentication.service';
|
import { AuthenticationService } from './authentication.service';
|
||||||
|
import { ContentService } from './content.service';
|
||||||
|
|
||||||
// eslint-disable-next-line no-shadow
|
// eslint-disable-next-line no-shadow
|
||||||
export enum ContentGroups {
|
export enum ContentGroups {
|
||||||
@ -49,8 +50,7 @@ export interface PeopleContentQueryRequestModel {
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class PeopleContentService {
|
export class PeopleContentService {
|
||||||
private hasContentAdminRole: boolean = false;
|
private currentUser: EcmUserModel;
|
||||||
hasCheckedIsContentAdmin: boolean = false;
|
|
||||||
|
|
||||||
private _peopleApi: PeopleApi;
|
private _peopleApi: PeopleApi;
|
||||||
get peopleApi(): PeopleApi {
|
get peopleApi(): PeopleApi {
|
||||||
@ -61,11 +61,11 @@ export class PeopleContentService {
|
|||||||
constructor(
|
constructor(
|
||||||
private apiService: AlfrescoApiService,
|
private apiService: AlfrescoApiService,
|
||||||
authenticationService: AuthenticationService,
|
authenticationService: AuthenticationService,
|
||||||
private logService: LogService
|
private logService: LogService,
|
||||||
|
private contentService: ContentService
|
||||||
) {
|
) {
|
||||||
authenticationService.onLogout.subscribe(() => {
|
authenticationService.onLogout.subscribe(() => {
|
||||||
this.hasCheckedIsContentAdmin = false;
|
this.resetLocalCurrentUser();
|
||||||
this.hasContentAdminRole = false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,23 +75,46 @@ export class PeopleContentService {
|
|||||||
* @param personId ID of the target user
|
* @param personId ID of the target user
|
||||||
* @returns User information
|
* @returns User information
|
||||||
*/
|
*/
|
||||||
getPerson(personId: string): Observable<any> {
|
getPerson(personId: string): Observable<EcmUserModel> {
|
||||||
const promise = this.peopleApi.getPerson(personId);
|
return from(this.peopleApi.getPerson(personId))
|
||||||
|
.pipe(
|
||||||
|
map((personEntry) => new EcmUserModel(personEntry.entry)),
|
||||||
|
tap( user => this.currentUser = user),
|
||||||
|
catchError((error) => this.handleError(error)));
|
||||||
|
}
|
||||||
|
|
||||||
return from(promise).pipe(
|
getCurrentPerson(): Observable<EcmUserModel> {
|
||||||
catchError((error) => this.handleError(error))
|
return this.getCurrentUserInfo();
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets information about the user who is currently logged in.
|
* Gets information about the current user alias -me-
|
||||||
*
|
*
|
||||||
* @returns User information
|
* @returns User information
|
||||||
*/
|
*/
|
||||||
getCurrentPerson(): Observable<any> {
|
getCurrentUserInfo(): Observable<EcmUserModel> {
|
||||||
|
if (this.currentUser) {
|
||||||
|
return of(this.currentUser);
|
||||||
|
}
|
||||||
return this.getPerson('-me-');
|
return this.getPerson('-me-');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to know if the current user has the admin capability
|
||||||
|
*
|
||||||
|
* @returns true or false
|
||||||
|
*/
|
||||||
|
isCurrentUserAdmin(): boolean {
|
||||||
|
return this.currentUser?.isAdmin() ?? false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset the local current user object
|
||||||
|
*/
|
||||||
|
resetLocalCurrentUser() {
|
||||||
|
this.currentUser = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a list of people.
|
* Gets a list of people.
|
||||||
*
|
*
|
||||||
@ -144,13 +167,14 @@ export class PeopleContentService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async isContentAdmin(): Promise<boolean> {
|
/**
|
||||||
if (!this.hasCheckedIsContentAdmin) {
|
* Returns a profile image as a URL.
|
||||||
const user: PersonEntry = await this.getCurrentPerson().toPromise();
|
*
|
||||||
this.hasContentAdminRole = user?.entry?.capabilities?.isAdmin;
|
* @param avatarId Target avatar
|
||||||
this.hasCheckedIsContentAdmin = true;
|
* @returns Image URL
|
||||||
}
|
*/
|
||||||
return this.hasContentAdminRole;
|
getUserProfileImage(avatarId: string): string {
|
||||||
|
return this.contentService.getContentUrl(avatarId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildOrderArray(sorting: PeopleContentSortingModel): string[] {
|
private buildOrderArray(sorting: PeopleContentSortingModel): string[] {
|
||||||
|
@ -70,3 +70,4 @@ export * from './identity-group.interface';
|
|||||||
export * from './language-item.interface';
|
export * from './language-item.interface';
|
||||||
export * from './sort-by-category.service';
|
export * from './sort-by-category.service';
|
||||||
export * from './user-access.service';
|
export * from './user-access.service';
|
||||||
|
export * from './user-info-resolver.service';
|
||||||
|
41
lib/core/services/user-info-resolver.service.ts
Normal file
41
lib/core/services/user-info-resolver.service.ts
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/*!
|
||||||
|
* @license
|
||||||
|
* Copyright 2019 Alfresco Software, Ltd.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import {
|
||||||
|
Resolve,
|
||||||
|
ActivatedRouteSnapshot,
|
||||||
|
RouterStateSnapshot
|
||||||
|
} from '@angular/router';
|
||||||
|
import { EcmUserModel } from '../models/ecm-user.model';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { PeopleContentService } from './people-content.service';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class UserInfoResolverService implements Resolve<EcmUserModel> {
|
||||||
|
constructor(private peopleContentService: PeopleContentService) {}
|
||||||
|
|
||||||
|
resolve(
|
||||||
|
_route: ActivatedRouteSnapshot,
|
||||||
|
_state: RouterStateSnapshot
|
||||||
|
): Observable<EcmUserModel> {
|
||||||
|
return this.peopleContentService.getCurrentUserInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -17,12 +17,11 @@
|
|||||||
|
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { By, DomSanitizer } from '@angular/platform-browser';
|
import { By, DomSanitizer } from '@angular/platform-browser';
|
||||||
import { AuthenticationService, ContentService } from '../../services';
|
import { AuthenticationService, ContentService, PeopleContentService } from '../../services';
|
||||||
import { InitialUsernamePipe } from '../../pipes';
|
import { InitialUsernamePipe } from '../../pipes';
|
||||||
import { fakeBpmUser } from '../../mock/bpm-user.service.mock';
|
import { fakeBpmUser } from '../../mock/bpm-user.service.mock';
|
||||||
import { fakeEcmEditedUser, fakeEcmUser, fakeEcmUserNoImage } from '../../mock/ecm-user.service.mock';
|
import { fakeEcmEditedUser, fakeEcmUser, fakeEcmUserNoImage } from '../../mock/ecm-user.service.mock';
|
||||||
import { BpmUserService } from '../../services/bpm-user.service';
|
import { BpmUserService } from '../../services/bpm-user.service';
|
||||||
import { EcmUserService } from '../../services/ecm-user.service';
|
|
||||||
import { IdentityUserService } from '../../services/identity-user.service';
|
import { IdentityUserService } from '../../services/identity-user.service';
|
||||||
import { BpmUserModel } from '../../models/bpm-user.model';
|
import { BpmUserModel } from '../../models/bpm-user.model';
|
||||||
import { EcmUserModel } from '../../models/ecm-user.model';
|
import { EcmUserModel } from '../../models/ecm-user.model';
|
||||||
@ -71,7 +70,7 @@ describe('User info component', () => {
|
|||||||
let element: HTMLElement;
|
let element: HTMLElement;
|
||||||
let authService: AuthenticationService;
|
let authService: AuthenticationService;
|
||||||
let contentService: ContentService;
|
let contentService: ContentService;
|
||||||
let ecmUserService: EcmUserService;
|
let peopleContentService: PeopleContentService;
|
||||||
let bpmUserService: BpmUserService;
|
let bpmUserService: BpmUserService;
|
||||||
let identityUserService: IdentityUserService;
|
let identityUserService: IdentityUserService;
|
||||||
|
|
||||||
@ -106,7 +105,7 @@ describe('User info component', () => {
|
|||||||
element = fixture.nativeElement;
|
element = fixture.nativeElement;
|
||||||
|
|
||||||
authService = TestBed.inject(AuthenticationService);
|
authService = TestBed.inject(AuthenticationService);
|
||||||
ecmUserService = TestBed.inject(EcmUserService);
|
peopleContentService = TestBed.inject(PeopleContentService);
|
||||||
bpmUserService = TestBed.inject(BpmUserService);
|
bpmUserService = TestBed.inject(BpmUserService);
|
||||||
contentService = TestBed.inject(ContentService);
|
contentService = TestBed.inject(ContentService);
|
||||||
identityUserService = TestBed.inject(IdentityUserService);
|
identityUserService = TestBed.inject(IdentityUserService);
|
||||||
@ -145,7 +144,7 @@ describe('User info component', () => {
|
|||||||
isEcmLoggedInStub = spyOn(authService, 'isEcmLoggedIn').and.returnValue(true);
|
isEcmLoggedInStub = spyOn(authService, 'isEcmLoggedIn').and.returnValue(true);
|
||||||
isLoggedInStub = spyOn(authService, 'isLoggedIn').and.returnValue(true);
|
isLoggedInStub = spyOn(authService, 'isLoggedIn').and.returnValue(true);
|
||||||
isBpmLoggedInStub = spyOn(authService, 'isBpmLoggedIn').and.returnValue(false);
|
isBpmLoggedInStub = spyOn(authService, 'isBpmLoggedIn').and.returnValue(false);
|
||||||
getCurrenEcmtUserInfoStub = spyOn(ecmUserService, 'getCurrentUserInfo').and.returnValue(of(fakeEcmUser));
|
getCurrenEcmtUserInfoStub = spyOn(peopleContentService, 'getCurrentUserInfo').and.returnValue(of(fakeEcmUser));
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('ui ', () => {
|
describe('ui ', () => {
|
||||||
|
@ -21,10 +21,10 @@ import { BpmUserModel } from '../../models/bpm-user.model';
|
|||||||
import { EcmUserModel } from '../../models/ecm-user.model';
|
import { EcmUserModel } from '../../models/ecm-user.model';
|
||||||
import { IdentityUserModel } from '../../models/identity-user.model';
|
import { IdentityUserModel } from '../../models/identity-user.model';
|
||||||
import { BpmUserService } from '../../services/bpm-user.service';
|
import { BpmUserService } from '../../services/bpm-user.service';
|
||||||
import { EcmUserService } from '../../services/ecm-user.service';
|
|
||||||
import { IdentityUserService } from '../../services/identity-user.service';
|
import { IdentityUserService } from '../../services/identity-user.service';
|
||||||
import { of, Observable, Subject } from 'rxjs';
|
import { of, Observable, Subject } from 'rxjs';
|
||||||
import { MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
import { MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material/menu';
|
||||||
|
import { PeopleContentService } from '../../services/people-content.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-userinfo',
|
selector: 'adf-userinfo',
|
||||||
@ -70,7 +70,7 @@ export class UserInfoComponent implements OnInit, OnDestroy {
|
|||||||
selectedIndex: number;
|
selectedIndex: number;
|
||||||
private destroy$ = new Subject();
|
private destroy$ = new Subject();
|
||||||
|
|
||||||
constructor(private ecmUserService: EcmUserService,
|
constructor(private peopleContentService: PeopleContentService,
|
||||||
private bpmUserService: BpmUserService,
|
private bpmUserService: BpmUserService,
|
||||||
private identityUserService: IdentityUserService,
|
private identityUserService: IdentityUserService,
|
||||||
private authService: AuthenticationService) {
|
private authService: AuthenticationService) {
|
||||||
@ -125,7 +125,7 @@ export class UserInfoComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private loadEcmUserInfo(): void {
|
private loadEcmUserInfo(): void {
|
||||||
this.ecmUser$ = this.ecmUserService.getCurrentUserInfo();
|
this.ecmUser$ = this.peopleContentService.getCurrentUserInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
private loadBpmUserInfo() {
|
private loadBpmUserInfo() {
|
||||||
@ -153,7 +153,7 @@ export class UserInfoComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getEcmAvatar(avatarId: any): string {
|
getEcmAvatar(avatarId: any): string {
|
||||||
return this.ecmUserService.getUserProfileImage(avatarId);
|
return this.peopleContentService.getUserProfileImage(avatarId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getBpmUserImage(): string {
|
getBpmUserImage(): string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user