[ADF-3745] Doc review updates (#4316)

* [ADF-3745] Updated compatibility page based on feedback

* [ADF-3745] Renamed node perm directive and fixed broken links

* [ADF-3745] Updated version index with Check allowable op directive

* [ADF-3745] Reviewed other files affected by node perm directive name change
This commit is contained in:
Andy Stark 2019-02-13 20:49:29 +00:00 committed by Eugenio Romano
parent 40d78a11c0
commit e318f3607a
8 changed files with 35 additions and 33 deletions

View File

@ -116,12 +116,12 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Context menu directive](core/context-menu.directive.md) | Adds a context menu to a component. | [Source](../lib/core/context-menu/context-menu.directive.ts) |
| [Check allowable operation directive](core/check-allowable-operation.directive.md) | Selectively disables an HTML element or Angular component. | [Source](../lib/core/directives/check-allowable-operation.directive.ts) |
| [Highlight directive](core/highlight.directive.md) | Adds highlighting to selected sections of an HTML element's content. | [Source](../lib/core/directives/highlight.directive.ts) |
| [Logout directive](core/logout.directive.md) | Logs the user out when the decorated element is clicked. | [Source](../lib/core/directives/logout.directive.ts) |
| [Node delete directive](core/node-delete.directive.md) | Deletes multiple files and folders. | [Source](../lib/core/directives/node-delete.directive.ts) |
| [Node download directive](core/node-download.directive.md) | Allows folders and/or files to be downloaded, with multiple nodes packed as a '.ZIP' archive. | [Source](../lib/core/directives/node-download.directive.ts) |
| [Node favorite directive](core/node-favorite.directive.md) | Selectively toggles nodes as favorites. | [Source](../lib/core/directives/node-favorite.directive.ts) |
| [Node permission directive](core/node-permission.directive.md) | Selectively disables an HTML element or Angular component. | [Source](../lib/core/directives/node-permission.directive.ts) |
| [Node restore directive](core/node-restore.directive.md) | Restores deleted nodes to their original location. | [Source](../lib/core/directives/node-restore.directive.ts) |
| [Upload directive](core/upload.directive.md) | Uploads content in response to file drag and drop. | [Source](../lib/core/directives/upload.directive.ts) |
@ -209,7 +209,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Data Table Adapter interface](core/datatable-adapter.interface.md) | Defines how table data is supplied to DataTable and Tasklist components. | [Source](../lib/core/datatable/data/datatable-adapter.ts) |
| [Form Field Validator interface](core/form-field-validator.interface.md) | Defines how the input fields of [`Form`](../../lib/process-services/task-list/models/form.model.ts) and Task Details components are validated. | [Source](../lib/core/form/components/widgets/core/form-field-validator.ts) |
| [Form Field Validator interface](core/form-field-validator.interface.md) | Defines how the input fields of Form and Task Details components are validated. | [Source](../lib/core/form/components/widgets/core/form-field-validator.ts) |
| [Search Configuration interface](core/search-configuration.interface.md) | Provides fine control of parameters to a search. | [Source](../lib/core/services/search-configuration.service.ts) |
[(Back to Contents)](#contents)
@ -319,7 +319,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Search Widget interface](content-services/search-widget.interface.md) | Specifies required properties for [Search filter component](../content-services/search-filter.component.md) widgets. | [Source](../lib/content-services/search/search-widget.interface.ts) |
| [Search Widget interface](content-services/search-widget.interface.md) | Specifies required properties for Search filter component widgets. | [Source](../lib/content-services/search/search-widget.interface.ts) |
[(Back to Contents)](#contents)

View File

@ -5,14 +5,21 @@ Title: Version compatibility
# Version compatibility
The table below shows the versions of Alfresco's backend services that
have been tested with latest versions of ADF. Note that *smoke testing*
means that the version should be safe to use (ie, it won't "catch fire")
but it is not guaranteed to be free of minor issues or missing features.
have been tested with latest versions of ADF.
Our goal is to support ADF for *all* versions of Content Services
and Process Services. However, we only test against a subset of those
versions that believe to be representative. If a bug is reported for a
version that we don't test against then the bug will still be fixed in
the next release (ie, the fact that a version is not tested doesn't mean that it isn't supported).
Note that [*smoke testing*](https://en.wikipedia.org/wiki/Smoke_testing_%28software%29) implies that the product will not "go up in smoke" when
used but the tests are quicker and not as thorough as with *full testing*.
You can find further information about released versions of ADF in the
[version index](versionIndex.md) and the [release notes](release-notes/README.md).
| ADF version | ACS versions | APS versions |
| ADF version | Content Services | Process Services |
| -- | -- | -- |
| [3.0.0](versionIndex.md#v300) | **Full test:** v6.1.0 RC7 <br/> **Smoke test:** v5.2.4 | **Full test:** v2.0.0 (latest CI pipeline build), v1.9.0 <br/>**Smoke test:** v1.8.1 |
| [2.6.0](versionIndex.md#v260) | **Full test:** v6.0.0, v5.2.4 <br/> **Smoke test:** v5.2.3 | **Full test:** v1.9.0 <br/>**Smoke test:** v1.8.1, v1.7.0, v1.6.4 |

View File

@ -7,7 +7,7 @@ Last reviewed: 2019-01-16
# [Content Node Selector Panel component](../../lib/content-services/content-node-selector/content-node-selector-panel.component.ts "Defined in content-node-selector-panel.component.ts")
Opens a [Content Node Selector](content-node-selecctor.component.md) in its own dialog window.
Opens a [Content Node Selector](content-node-selector.component.md) in its own dialog window.
![Content Node Selector screenshot](../docassets/images/ContentNodeSelector.png)

View File

@ -2,6 +2,7 @@
Title: Permission Style model
Added: v2.0.0
Status: Active
Last reviewed: 2019-02-13
---
# [Permission Style model](../../lib/content-services/document-list/models/permissions-style.model.ts "Defined in permissions-style.model.ts")
@ -28,7 +29,7 @@ and can be applied separately to files and folders by setting `isFile` and `isFo
### Permissions enum
The [Permissions](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/models/allowable-operations.enum.ts)
The [Allowable Operations](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/models/allowable-operations.enum.ts)
enum contains all the valid permissions for which you can apply custom styles: **DELETE**, **UPDATE**,
**CREATE**, **UPDATEPERMISSIONS**, **NOT_DELETE**, **NOT_UPDATE**, **NOT_CREATE**, **NOT_UPDATEPERMISSIONS**.

View File

@ -56,12 +56,12 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Context menu directive](context-menu.directive.md) | Adds a context menu to a component. | [Source](../../lib/core/context-menu/context-menu.directive.ts) |
| [Check allowable operation directive](check-allowable-operation.directive.md) | Selectively disables an HTML element or Angular component. | [Source](../../lib/core/directives/check-allowable-operation.directive.ts) |
| [Highlight directive](highlight.directive.md) | Adds highlighting to selected sections of an HTML element's content. | [Source](../../lib/core/directives/highlight.directive.ts) |
| [Logout directive](logout.directive.md) | Logs the user out when the decorated element is clicked. | [Source](../../lib/core/directives/logout.directive.ts) |
| [Node delete directive](node-delete.directive.md) | Deletes multiple files and folders. | [Source](../../lib/core/directives/node-delete.directive.ts) |
| [Node download directive](node-download.directive.md) | Allows folders and/or files to be downloaded, with multiple nodes packed as a '.ZIP' archive. | [Source](../../lib/core/directives/node-download.directive.ts) |
| [Node favorite directive](node-favorite.directive.md) | Selectively toggles nodes as favorites. | [Source](../../lib/core/directives/node-favorite.directive.ts) |
| [Node permission directive](node-permission.directive.md) | Selectively disables an HTML element or Angular component. | [Source](../../lib/core/directives/node-permission.directive.ts) |
| [Node restore directive](node-restore.directive.md) | Restores deleted nodes to their original location. | [Source](../../lib/core/directives/node-restore.directive.ts) |
| [Upload directive](upload.directive.md) | Uploads content in response to file drag and drop. | [Source](../../lib/core/directives/upload.directive.ts) |

View File

@ -1,11 +1,11 @@
---
Title: Node Permission directive
Title: Check Allowable Operation directive
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-20
Last reviewed: 2019-02-13
---
# [Node Permission directive](../../lib/core/directives/node-permission.directive.ts "Defined in node-permission.directive.ts")
# [Check Allowable Operation directive](../../lib/core/directives/check-allowable-operation.directive.ts "Defined in check-allowable-operation.directive.ts")
Selectively disables an HTML element or Angular component.
@ -17,7 +17,7 @@ Selectively disables an HTML element or Angular component.
- [Details](#details)
- [HTML element example](#html-element-example)
- [Angular component example](#angular-component-example)
- [Implementing the NodePermissionSubject interface](#implementing-the-nodepermissionsubject-interface)
- [Implementing the NodeAllowableOperationSubject interface](#implementing-the-nodeallowableoperationsubject-interface)
- [Defining your component as an EXTENDIBLE_COMPONENT parent component](#defining-your-component-as-an-extendible_component-parent-component)
## Basic Usage
@ -47,7 +47,7 @@ Selectively disables an HTML element or Angular component.
## Details
The [Node Permission directive](../core/node-permission.directive.md) lets you disable an HTML element or Angular component
The [Check Allowable Operation Directive](../core/check-allowable-operation.directive.md) lets you disable an HTML element or Angular component
by taking a collection of [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md) instances and checking their permissions.
The decorated element will be disabled if:
@ -59,8 +59,7 @@ The decorated element will be disabled if:
A typical use case is to bind a [Document List](../content-services/document-list.component.md)
selection property to a toolbar button. In the following example, the "Delete" button should
be disabled if no selection is present or if user does not have permission to delete at least one
node in the selection:
be disabled if no selection is present or if user does not have permission to delete at least one node in the selection:
```html
<adf-toolbar title="toolbar example">
@ -81,7 +80,7 @@ one or more documents that they have permission to delete.
### Angular component example
You can add the directive to any Angular component that implements the [`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts)
You can add the directive to any Angular component that implements the [`NodeAllowableOperationSubject`](../../lib/core/directives/check-allowable-operation.directive.ts)
interface (the [Upload Drag Area component](../content-services/upload-drag-area.component.md),
for example). You can also use it in much the same way as you would with an HTML element:
@ -96,21 +95,21 @@ for example). You can also use it in much the same way as you would with an HTML
```
To enable your own component to work with this directive, you need to implement the
[`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts) interface and also define it as an
[`NodeAllowableOperationSubject`](../../lib/core/directives/check-allowable-operation.directive.ts) interface and also define it as an
[`EXTENDIBLE_COMPONENT`](../../lib/core/interface/injection.tokens.ts)
parent component,
as described in the following sections.
### Implementing the NodePermissionSubject interface
### Implementing the NodeAllowableOperationSubject interface
The component must implement the [`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts) interface which means it must have a
The component must implement the [`NodeAllowableOperationSubject`](../../lib/core/directives/check-allowable-operation.directive.ts) interface which means it must have a
boolean `disabled` property. This is the property that will be set by the directive:
```js
import { NodePermissionSubject } from '@alfresco/adf-core';
@Component({...})
export class UploadDragAreaComponent implements NodePermissionSubject {
export class UploadDragAreaComponent implements NodeAllowableOperationSubject {
public disabled: boolean = false;
}
```
@ -134,8 +133,7 @@ import { EXTENDIBLE_COMPONENT } from '@alfresco/adf-core';
{ provide: EXTENDIBLE_COMPONENT, useExisting: forwardRef(() => UploadDragAreaComponent)}
]
})
export class UploadDragAreaComponent implements NodePermissionSubject { ... }
export class UploadDragAreaComponent implements NodeAllowableOperationSubject { ... }
```
**Note:** the usage of **viewProviders** (instead of **providers**) is very important, especially
if you want to use this directive on a transcluded component.
**Note:** the usage of **viewProviders** (instead of **providers**) is very important, especially if you want to use this directive on a transcluded component.

View File

@ -2,7 +2,7 @@
Title: Content service
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-13
Last reviewed: 2019-02-13
---
# [Content service](../../lib/core/services/content.service.ts "Defined in content.service.ts")
@ -56,14 +56,10 @@ Accesses app-generated data objects via URLs and file downloads.
Gets content for the given node.
- _nodeId:_ `string` - ID of the target node
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Content data
- **hasAllowableOperations**(node: `any`): `boolean`<br/>
Checks if the node has the properties allowableOperations
- _node:_ `any` - Node to check allowableOperations
- **Returns** `boolean` - True if the node has the property, false otherwise
- **hasAllowableOperations**(node: `Node`, permission: [`AllowableOperationsEnum`](../../lib/core/models/allowable-operations.enum.ts)`|string`): `boolean`<br/>
- **hasAllowableOperations**(node: `Node`, allowableOperation: [`AllowableOperationsEnum`](../../lib/core/models/allowable-operations.enum.ts)`|string`): `boolean`<br/>
Checks if the user has permissions on that node
- _node:_ `Node` - Node to check allowableOperations
- _permission:_ [`AllowableOperationsEnum`](../../lib/core/models/allowable-operations.enum.ts)`|string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- _allowableOperation:_ [`AllowableOperationsEnum`](../../lib/core/models/allowable-operations.enum.ts)`|string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- **Returns** `boolean` - True if the user has the required permissions, false otherwise
## Details

View File

@ -232,6 +232,7 @@ backend services have been tested with each released version of ADF.
- [Card item types service](core/card-item-types.service.md)
- [Card view update service](core/card-view-update.service.md)
- [Card view component](core/card-view.component.md)
- [Check allowable operation directive](core/check-allowable-operation.directive.md)
- [Checklist component](process-services/checklist.component.md)
- [Comment list component](core/comment-list.component.md)
- [Comment process service](core/comment-process.service.md)
@ -286,7 +287,6 @@ backend services have been tested with each released version of ADF.
- [Node delete directive](core/node-delete.directive.md)
- [Node favorite directive](core/node-favorite.directive.md)
- [Node name tooltip pipe](core/node-name-tooltip.pipe.md)
- [Node permission directive](core/node-permission.directive.md)
- [Node permission service](content-services/node-permission.service.md)
- [Node restore directive](core/node-restore.directive.md)
- [Node service](core/node.service.md)