rename old hasPermission as allowableOperation and introduce the real hasPermissions (#4294)

This commit is contained in:
Eugenio Romano
2019-02-11 10:44:37 +00:00
committed by GitHub
parent 324e86aaf3
commit 3263659ac2
39 changed files with 256 additions and 178 deletions

View File

@@ -60,10 +60,10 @@ Accesses app-generated data objects via URLs and file downloads.
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
- **hasPermission**(node: `Node`, permission: [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string`): `boolean`<br/>
- **hasAllowableOperations**(node: `Node`, permission: [`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:_ [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- _permission:_ [`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

@@ -25,7 +25,7 @@ Selectively disables an HTML element or Angular component.
```html
<adf-toolbar title="toolbar example">
<button mat-icon-button
adf-node-permission="delete"
adf-check-allowable-operation="delete"
[adf-nodes]="documentList.selection">
<mat-icon>delete</mat-icon>
</button>
@@ -65,7 +65,7 @@ node in the selection:
```html
<adf-toolbar title="toolbar example">
<button mat-icon-button
adf-node-permission="delete"
adf-check-allowable-operation="delete"
[adf-nodes]="documentList.selection">
<mat-icon>delete</mat-icon>
</button>
@@ -89,7 +89,7 @@ for example). You can also use it in much the same way as you would with an HTML
<alfresco-upload-drag-area
[rootFolderId]="..."
[versioning]="..."
[adf-node-permission]="'create'"
[adf-check-allowable-operation]="'create'"
[adf-nodes]="getCurrentDocumentListNode()">
...
</alfresco-upload-drag-area>