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:
@@ -87,7 +87,7 @@ the `parentId`.
|
||||
|
||||
### Permissions
|
||||
|
||||
The `hasPermission` method reports whether or not the user has the specified permission for the
|
||||
The `hasAllowableOperations` method reports whether or not the user has the specified permission for the
|
||||
node. The Permissions enum contains the values DELETE, UPDATE, CREATE, UPDATEPERMISSIONS, NOT_DELETE, NOT_UPDATE, NOT_CREATE and NOT_UPDATEPERMISSIONS but you can also supply these
|
||||
values via their string equivalents.
|
||||
|
||||
|
@@ -28,7 +28,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/permissions.enum.ts)
|
||||
The [Permissions](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**.
|
||||
|
||||
@@ -39,7 +39,7 @@ If you want to change the style on rows where the user can create content:
|
||||
```ts
|
||||
let permissionsStyle: PermissionStyleModel[] = [];
|
||||
|
||||
this.permissionsStyle.push(new PermissionStyleModel('document-list__create', PermissionsEnum.CREATE));
|
||||
this.permissionsStyle.push(new PermissionStyleModel('document-list__create', AllowableOperationsEnum.CREATE));
|
||||
```
|
||||
|
||||
```html
|
||||
@@ -58,7 +58,7 @@ If you want to change the style on the folders where the user doesn't have the p
|
||||
```ts
|
||||
let permissionsStyle: PermissionStyleModel[] = [];
|
||||
|
||||
this.permissionsStyle.push(new PermissionStyleModel('document-list__disable', PermissionsEnum.NOT_UPDATE, false, true));
|
||||
this.permissionsStyle.push(new PermissionStyleModel('document-list__disable', AllowableOperationsEnum.NOT_UPDATE, false, true));
|
||||
```
|
||||
|
||||
```html
|
||||
|
Reference in New Issue
Block a user