diff --git a/packages/client/src/store/AccessRightsStore.js b/packages/client/src/store/AccessRightsStore.js index 314512ef47..445e4f514f 100644 --- a/packages/client/src/store/AccessRightsStore.js +++ b/packages/client/src/store/AccessRightsStore.js @@ -169,21 +169,6 @@ class AccessRightsStore { return getFileRoleActions(access).moveSelf; }; - canMakeForm = (item) => { - const { rootFolderType, access } = item; - - if ( - rootFolderType === FolderType.Archive || - rootFolderType === FolderType.TRASH || - rootFolderType === FolderType.Privacy || - rootFolderType === FolderType.Favorites || - rootFolderType === FolderType.Recent - ) - return false; - - return getFileRoleActions(access).saveAsForm; - }; - canMoveAlienItems = (item) => { const { rootFolderType, @@ -198,6 +183,20 @@ class AccessRightsStore { return getFileRoleActions(access).moveAlien; }; + canMakeForm = (item) => { + const { rootFolderType, access } = item; + + if ( + rootFolderType === FolderType.Archive || + rootFolderType === FolderType.TRASH || + rootFolderType === FolderType.Privacy || + rootFolderType === FolderType.Favorites || + rootFolderType === FolderType.Recent + ) + return false; + + return getFileRoleActions(access).saveAsForm; + }; canArchiveRoom = (room) => { const { archive } = getRoomRoleActions(room.access); diff --git a/packages/client/src/store/FilesStore.js b/packages/client/src/store/FilesStore.js index 1ed2814c67..3cbd88b2a8 100644 --- a/packages/client/src/store/FilesStore.js +++ b/packages/client/src/store/FilesStore.js @@ -1208,12 +1208,12 @@ class FilesStore { "mark-as-favorite", "remove-from-favorites", // "edit", - "move", + // "move", // "move-to", "copy-to", "copy", //"rename", - "separator2", + // "separator2", //"delete", //"finalize-version", ]); @@ -1243,7 +1243,13 @@ class FilesStore { fileOptions = this.removeOptions(fileOptions, ["docu-sign"]); } - if (isEditing) + if ( + isEditing || + item.rootFolderType === FolderType.Archive || + (isFavoritesFolder && !isFavorite) || + isFavoritesFolder || + isRecentFolder + ) fileOptions = this.removeOptions(fileOptions, ["separator2"]); // if (isEditing) { @@ -1270,9 +1276,6 @@ class FilesStore { } } - if (isFavoritesFolder && !isFavorite) - fileOptions = this.removeOptions(fileOptions, ["separator2"]); - if (isFavoritesFolder) { fileOptions = this.removeOptions(fileOptions, [ // "move-to", @@ -1302,9 +1305,6 @@ class FilesStore { ]); } - if (isRecentFolder && !isFavorite) - fileOptions = this.removeOptions(fileOptions, ["separator2"]); - // if (isRecentFolder) { // //fileOptions = this.removeOptions(fileOptions, ["delete"]); @@ -1320,7 +1320,7 @@ class FilesStore { // "move-to", //"sharing-settings", "unsubscribe", - "separator2", + //"separator2", ]); }