mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1236] Manage Versions - of Shared Files (#251)
* you can't open version history for multiple files selected * update node-version directive to handle the node versions of shared files
This commit is contained in:
@@ -136,13 +136,20 @@ 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);
|
||||
canUpdateFile(selection: Array<MinimalNodeEntity>): boolean {
|
||||
return this.isFileSelected(selection) && this.nodeHasPermission(selection[0].entry, 'update');
|
||||
}
|
||||
|
||||
userHasPermissionToManageVersions(nodeEntry): boolean {
|
||||
return this.nodeHasPermission(nodeEntry, 'update');
|
||||
canUpdateFileShared(selection: Array<MinimalNodeEntity>): boolean {
|
||||
return this.isFileSelected(selection) && this.nodeSharedHasPermission(selection[0].entry, 'update');
|
||||
}
|
||||
|
||||
canManageVersions(selection: Array<MinimalNodeEntity>): boolean {
|
||||
return this.canUpdateFile(selection);
|
||||
}
|
||||
|
||||
canManageVersionsOfShared(selection: Array<MinimalNodeEntity>): boolean {
|
||||
return this.canUpdateFileShared(selection);
|
||||
}
|
||||
|
||||
nodeHasPermission(node: MinimalNodeEntryEntity, permission: string): boolean {
|
||||
|
Reference in New Issue
Block a user