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:
@@ -21,7 +21,7 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
- [Column Template](#column-template)
|
||||
- [Styling Techniques](#styling-techniques)
|
||||
- [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)
|
||||
|
||||
## Basic Usage
|
||||
@@ -44,18 +44,18 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
|
||||
| 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. |
|
||||
| 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. |
|
||||
| focus | `boolean` | true | Enable or disable cell focus |
|
||||
| format | `string` | | Value format (if supported by the parent component), for example format of the date. |
|
||||
| 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`. |
|
||||
| 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 |
|
||||
| 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. |
|
||||
@@ -363,7 +363,7 @@ HTML `<data-column>` element example:
|
||||
<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
|
||||
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". |
|
||||
| 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). |
|
||||
| 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. |
|
||||
| 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. |
|
||||
@@ -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. |
|
||||
| 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. |
|
||||
| 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`] |
|
||||
| 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 |
|
||||
| ---- | ---- | ----------- |
|
||||
| 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. |
|
||||
| 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. |
|
||||
| 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. |
|
||||
| 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
|
||||
|
||||
|
@@ -27,7 +27,7 @@ based on the field type or the metadata information.
|
||||
|
||||
| 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
|
||||
|
||||
|
@@ -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. |
|
||||
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
||||
| 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 |
|
||||
| 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)? |
|
||||
|
@@ -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/>
|
||||
Loads the config file.
|
||||
- **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/>
|
||||
Requests notification of a property value when it is loaded.
|
||||
- _property:_ `string` - The desired property value
|
||||
|
@@ -13,20 +13,20 @@ Maps type names to field component types for the [Card View component](../compon
|
||||
|
||||
### 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.
|
||||
- _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
|
||||
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
||||
Register multiple components
|
||||
- _components:_ `Function` -
|
||||
- _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.
|
||||
- _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.
|
||||
- **Returns** `Type<__type>` - Component type
|
||||
- _defaultValue:_ `Type<any>` - Default type returned for field types that are not yet mapped.
|
||||
- **Returns** `Type<any>` - Component type
|
||||
- **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.
|
||||
- _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
|
||||
|
||||
- **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.
|
||||
- _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
|
||||
|
||||
## 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/>
|
||||
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
|
||||
- **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.
|
||||
- **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
|
||||
|
||||
|
@@ -23,9 +23,9 @@ Gets a list of items a user has marked as their favorites.
|
||||
- _entries:_ `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) -
|
||||
|
||||
- **remapEntry**(\_\_namedParameters: `Function`): `any`<br/>
|
||||
|
@@ -13,20 +13,20 @@ Maps a form field type string onto the corresponding form [widget component](../
|
||||
|
||||
### 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.
|
||||
- _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
|
||||
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
||||
Register multiple components
|
||||
- _components:_ `Function` -
|
||||
- _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.
|
||||
- _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.
|
||||
- **Returns** `Type<__type>` - Component type
|
||||
- _defaultValue:_ `Type<any>` - Default type returned for field types that are not yet mapped.
|
||||
- **Returns** `Type<any>` - Component type
|
||||
- **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.
|
||||
- _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
|
||||
|
||||
- **decodeToken**(token: `any`): `Object`<br/>
|
||||
- **decodeToken**(token: `any`): `any`<br/>
|
||||
Decodes a JSON web token into a JS object.
|
||||
- _token:_ `any` - Token in encoded form
|
||||
- **Returns** `Object` - Decoded token data object
|
||||
- **Returns** `any` - Decoded token data object
|
||||
- **getAccessToken**(): `string`<br/>
|
||||
Gets 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.
|
||||
- _opts:_ `any` - (Optional) Optional parameters
|
||||
- **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/>
|
||||
Gets information about the user who is currently logged in.
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
|
||||
- **getPerson**(personId: `string`): [`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 current user alias -me-
|
||||
- **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)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>`<br/>
|
||||
Gets information about a user identified by their username.
|
||||
- _personId:_ `string` - ID of the target user
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
|
||||
- **isContentAdmin**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<boolean>`<br/>
|
||||
|
||||
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<boolean>` -
|
||||
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../../core/models/ecm-user.model.md)`>` - User information
|
||||
- **getUserProfileImage**(avatarId: `string`): `string`<br/>
|
||||
Returns a profile image as a URL.
|
||||
- _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/>
|
||||
Gets a list of people.
|
||||
- _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
|
||||
- **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
|
||||
- _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
|
||||
- **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
|
||||
- _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
|
||||
- **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.
|
||||
- _nodeId:_ `string` - ID of the target node
|
||||
- _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/>
|
||||
Generates a rendition for a node using the first available encoding.
|
||||
- _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.
|
||||
- _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
|
||||
- **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
|
||||
- _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
|
||||
- **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
|
||||
@@ -52,24 +52,24 @@ Accesses and manipulates sites from a Content Services repository.
|
||||
- **getEcmCurrentLoggedUserName**(): `string`<br/>
|
||||
Gets the username of the user currently logged into ACS.
|
||||
- **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.
|
||||
- _siteId:_ `string` - ID of the target site
|
||||
- _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
|
||||
- **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/>
|
||||
- **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)`|any>`<br/>
|
||||
Gets a site's content.
|
||||
- _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/>
|
||||
Get information about site membership of group
|
||||
- _siteId:_ `string` - The identifier of a site.
|
||||
- _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>
|
||||
- **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.
|
||||
- _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/>
|
||||
Gets a list of site membership requests.
|
||||
- _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.
|
||||
- _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
|
||||
- **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
|
||||
- _siteId:_ `string` - The identifier of a site.
|
||||
- _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/>
|
||||
Gets a list of all a site's members.
|
||||
- _siteId:_ `string` - ID of the target site
|
||||
|
@@ -17,15 +17,15 @@ Supports localisation.
|
||||
Adds a new folder of translation source files.
|
||||
- _name:_ `string` - Name for the translation provider
|
||||
- _path:_ `string` - Path to the folder
|
||||
- **get**(key: `string|Array<string>`, interpolateParams?: `Object`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string|any>`<br/>
|
||||
- **get**(key: `string|Array<string>`, interpolateParams?: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string|any>`<br/>
|
||||
Gets the translation for the supplied key.
|
||||
- _key:_ `string|Array<string>` - Key to translate
|
||||
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
|
||||
- _interpolateParams:_ `any` - (Optional) String(s) to be interpolated into the main message
|
||||
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string|any>` - Translated text
|
||||
- **instant**(key: `string|Array<string>`, interpolateParams?: `Object`): `string|any`<br/>
|
||||
- **instant**(key: `string|Array<string>`, interpolateParams?: `any`): `string|any`<br/>
|
||||
Directly returns the translation for the supplied key.
|
||||
- _key:_ `string|Array<string>` - Key to translate
|
||||
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
|
||||
- _interpolateParams:_ `any` - (Optional) String(s) to be interpolated into the main message
|
||||
- **Returns** `string|any` - Translated text
|
||||
- **loadTranslation**(lang: `string`, fallback?: `string`)<br/>
|
||||
Loads a translation file.
|
||||
|
@@ -20,11 +20,16 @@ Provides access to various APIs related to file upload features.
|
||||
- **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.
|
||||
- _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/>
|
||||
Clears the upload queue
|
||||
- **getQueue**(): [`FileModel`](../../../lib/core/models/file.model.ts)`[]`<br/>
|
||||
Gets the file 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/>
|
||||
Gets an upload promise for a 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
|
||||
|
||||
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:
|
||||
|
||||
**app.config.json**
|
||||
|
@@ -12,16 +12,18 @@ Checks the global and application access of a user
|
||||
## Class members
|
||||
|
||||
### Methods
|
||||
- **fetchUserAccess**()<br/>
|
||||
Fetches the global and application access of the user
|
||||
- **hasApplicationAccess**(appName: `string`, rolesToCheck: string[]): `boolean`<br/>
|
||||
Checks if the user has at least one of the roles to check for a given app.
|
||||
- appName: `string` - The name of the app
|
||||
- rolesToCheck: `string[]` - The roles to check
|
||||
- **Returns** `boolean` - True if it contains at least one of the given roles to check for the given app, false otherwise
|
||||
- **hasGlobalAccess**(rolesToCheck: string[]): `boolean`<br/>
|
||||
Checks if the user has at least one of the given roles to check in the global roles.
|
||||
- rolesToCheck: `string[]` - The roles to check
|
||||
- **Returns** `boolean` - True if it contains at least one of the given roles to check, false otherwise
|
||||
- **resetAccess**() <br>
|
||||
Resets the cached access of the user
|
||||
|
||||
- **fetchUserAccess**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<void>`<br/>
|
||||
Fetches the global and application access of the user
|
||||
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<void>` -
|
||||
- **hasApplicationAccess**(appName: `string`, rolesToCheck: `string[]`): `boolean`<br/>
|
||||
Checks for global roles access.
|
||||
- _appName:_ `string` - The app name
|
||||
- _rolesToCheck:_ `string[]` - List of the roles to check
|
||||
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
|
||||
- **hasGlobalAccess**(rolesToCheck: `string[]`): `boolean`<br/>
|
||||
Checks for global roles access.
|
||||
- _rolesToCheck:_ `string[]` - List of the roles to check
|
||||
- **Returns** `boolean` - True if it contains at least one of the given roles, false otherwise
|
||||
- **resetAccess**()<br/>
|
||||
Resets the cached user access
|
||||
|
Reference in New Issue
Block a user