mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-1221] Files versions manager (#247)
* [ACA-1221] Integrate the component as it currently is on ADF. add versions as a modal * refactor scss file * remove permission check from directive * emit event on node type error
This commit is contained in:
committed by
Cilibiu Bogdan
parent
3a51f7c6b0
commit
ae5bd67067
@@ -136,6 +136,15 @@ export abstract class PageComponent {
|
||||
return this.isFileSelected(selection);
|
||||
}
|
||||
|
||||
canManageVersions(selection: Array<MinimalNodeEntity>): boolean {
|
||||
const lastItem = selection.length && selection[selection.length - 1].entry;
|
||||
return lastItem && lastItem.isFile && this.userHasPermissionToManageVersions(lastItem);
|
||||
}
|
||||
|
||||
userHasPermissionToManageVersions(nodeEntry): boolean {
|
||||
return this.nodeHasPermission(nodeEntry, 'update');
|
||||
}
|
||||
|
||||
nodeHasPermission(node: MinimalNodeEntryEntity, permission: string): boolean {
|
||||
if (node && permission) {
|
||||
const { allowableOperations = [] } = <any>(node || {});
|
||||
|
Reference in New Issue
Block a user