mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
rename old hasPermission as allowableOperation and introduce the real hasPermissions (#4294)
This commit is contained in:
@@ -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
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user