mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6369] - ACA on multi select file/folder permisstion menu should not be shown (#3571)
This commit is contained in:
@@ -51,8 +51,8 @@ export const folderFavFile = {
|
|||||||
|
|
||||||
// ---- multiple selection ---
|
// ---- multiple selection ---
|
||||||
|
|
||||||
const multipleSelContextMenu = ['Download', 'Favorite', 'Move', 'Copy', 'Delete', 'Permissions'];
|
const multipleSelContextMenu = ['Download', 'Favorite', 'Move', 'Copy', 'Delete'];
|
||||||
const multipleSelToolbarMore = ['Favorite', 'Move', 'Copy', 'Delete', 'Permissions'];
|
const multipleSelToolbarMore = ['Favorite', 'Move', 'Copy', 'Delete'];
|
||||||
|
|
||||||
export const multipleSelFile = {
|
export const multipleSelFile = {
|
||||||
contextMenu: multipleSelContextMenu,
|
contextMenu: multipleSelContextMenu,
|
||||||
|
@@ -849,12 +849,17 @@ describe('app.evaluators', () => {
|
|||||||
expect(app.canManagePermissions(context)).toBe(false);
|
expect(app.canManagePermissions(context)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should return false if many nodes are selected', () => {
|
||||||
|
context.selection.count = 2;
|
||||||
|
expect(app.canManagePermissions(context)).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
it('should return false if the selected node is a smart folder', () => {
|
it('should return false if the selected node is a smart folder', () => {
|
||||||
context.selection.first = { entry: { aspectNames: ['smf:customConfigSmartFolder'], isFolder: true } } as NodeEntry;
|
context.selection.first = { entry: { aspectNames: ['smf:customConfigSmartFolder'], isFolder: true } } as NodeEntry;
|
||||||
expect(app.canManagePermissions(context)).toBe(false);
|
expect(app.canManagePermissions(context)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return true if user can update the selected node and it is not a trashcan nor smart folder', () => {
|
it('should return true if user can update the selected node and it is not a trashcan nor smart folder nor multiselect', () => {
|
||||||
expect(app.canManagePermissions(context)).toBe(true);
|
expect(app.canManagePermissions(context)).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -505,7 +505,7 @@ export const canEditAspects = (context: RuleContext): boolean =>
|
|||||||
* @param context Rule execution context
|
* @param context Rule execution context
|
||||||
*/
|
*/
|
||||||
export const canManagePermissions = (context: RuleContext): boolean =>
|
export const canManagePermissions = (context: RuleContext): boolean =>
|
||||||
[canUpdateSelectedNode(context), navigation.isNotTrashcan(context), !isSmartFolder(context)].every(Boolean);
|
[canUpdateSelectedNode(context), navigation.isNotTrashcan(context), !isSmartFolder(context), !isMultiselection(context)].every(Boolean);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if user can toggle **Edit Offline** mode for selected node.
|
* Checks if user can toggle **Edit Offline** mode for selected node.
|
||||||
|
Reference in New Issue
Block a user