]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): disable `Unshare` until proper fix
authorJohn Molakvoæ <skjnldsv@protonmail.com>
Fri, 26 Jan 2024 17:09:37 +0000 (18:09 +0100)
committerJohn Molakvoæ <skjnldsv@protonmail.com>
Sat, 27 Jan 2024 11:49:53 +0000 (12:49 +0100)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
apps/files/src/actions/deleteAction.spec.ts
apps/files/src/actions/deleteAction.ts

index f1aee5bdcbabdf190a073d33eb747776c3382e05..afc7ec5b92140589ca62f0af0c7c89ae2b86ee2c 100644 (file)
@@ -71,10 +71,11 @@ describe('Delete action conditions tests', () => {
                expect(action.displayName([file], trashbinView)).toBe('Delete permanently')
        })
 
-       test('Shared node values', () => {
-               jest.spyOn(auth, 'getCurrentUser').mockReturnValue(null)
-               expect(action.displayName([file2], view)).toBe('Unshare')
-       })
+       // TODO: Fix this test
+       // test('Shared node values', () => {
+       //      jest.spyOn(auth, 'getCurrentUser').mockReturnValue(null)
+       //      expect(action.displayName([file2], view)).toBe('Unshare')
+       // })
 
        test('Shared and owned nodes values', () => {
                expect(action.displayName([file, file2], view)).toBe('Delete and unshare')
index 29f1cf86c9ba077601bcfda0d854cfb309a592e1..9e7fae71d47c8d6457c7e66a83a7d54f182cc2fa 100644 (file)
@@ -46,9 +46,10 @@ export const action = new FileAction({
                        return t('files', 'Delete and unshare')
                }
 
-               if (isAllUnshare(nodes)) {
-                       return t('files', 'Unshare')
-               }
+               // Temporary disabled until fixed on 28.0.3
+               // if (isAllUnshare(nodes)) {
+               //      return t('files', 'Unshare')
+               // }
 
                return view.id === 'trashbin'
                        ? t('files', 'Delete permanently')