mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fetch the userInfo once loggedIn and expose the capability of admin (#7682)
* Fetch the userInfo once loggedIn and expose the cabilibility of admin * Rollback method * Return same use if defined * Use the same pepleContent service for UserInfoCOmpnent * Remove useless import * Use interface * Use angular resolver instead of guard * Remove fdescribe * Fix linting * Regenerate doc * Improve doc * Fix optional * Fix the unit test * Fix comment * Fix lint * Fix unit * Add fetch user as part of the ssoGuard * Fix unit test after fetch * Add additional unit * Fix await
This commit is contained in:
@@ -47,7 +47,7 @@ For example :
|
||||
|
||||
| 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
|
||||
|
||||
|
@@ -43,7 +43,7 @@ Shows/edits process filter details.
|
||||
|
||||
| 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. |
|
||||
| filterProperties | `string[]` | | List of process filter properties to display |
|
||||
| id | `string` | | Id of the process instance filter. |
|
||||
|
@@ -46,7 +46,7 @@ Searches Groups.
|
||||
| roles | `string[]` | \[] | Role names of the groups to be listed. |
|
||||
| searchGroupsControl | `FormControl` | | FormControl to search the group |
|
||||
| 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
|
||||
|
||||
|
@@ -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 |
|
||||
| title | `string` | | Placeholder translation key |
|
||||
| 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
|
||||
|
||||
|
@@ -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. |
|
||||
| showActions | `boolean` | false | Toggles the data actions column. |
|
||||
| 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. |
|
||||
| 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. |
|
||||
|
@@ -37,12 +37,13 @@ Starts a process.
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| 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. |
|
||||
| processDefinitionName | `string` | | Name of the process definition. |
|
||||
| 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. |
|
||||
| variables | `__type` | | Variables to attach to the payload. |
|
||||
| variables | `any` | | Variables to attach to the payload. |
|
||||
|
||||
### Events
|
||||
|
||||
|
@@ -26,7 +26,7 @@ Creates/starts a new task for the specified app.
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| 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. |
|
||||
|
||||
### 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. |
|
||||
| showActions | `boolean` | false | Toggles the data actions column. |
|
||||
| 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. |
|
||||
| status | `string` | "" | Filter the tasks. Display only tasks with status equal to the supplied value. |
|
||||
| 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
|
||||
- _filterName:_ `string` - Name of the target process 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) -
|
||||
|
||||
- **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
|
||||
- _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
|
||||
- **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[]` -
|
||||
- _appName:_ `string` - (Optional)
|
||||
- _id:_ `string` - (Optional)
|
||||
- **Returns** `Object` -
|
||||
- **Returns** `any` -
|
||||
|
||||
## 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/>
|
||||
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)
|
||||
- **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/>
|
||||
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
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<void>` -
|
||||
- **getBasePath**(appName: `string`): `string`<br/>
|
||||
@@ -28,10 +28,16 @@ Gets process definitions and starts processes.
|
||||
- _appName:_ `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.
|
||||
- _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
|
||||
- **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/>
|
||||
Starts an already created process using the process instance id.
|
||||
- _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
|
||||
- **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.
|
||||
- _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)
|
||||
- **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/>
|
||||
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
|
||||
- _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
|
||||
|
@@ -18,14 +18,14 @@ Searches tasks.
|
||||
- _appName:_ `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.
|
||||
- _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
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Task information
|
||||
|
||||
## Details
|
||||
|
||||
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.
|
||||
|
Reference in New Issue
Block a user