Browse Source

fix(files): disable `Unshare` until proper fix

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
tags/v29.0.0beta1
John Molakvoæ 4 months ago
parent
commit
d06ed4d7cb
No account linked to committer's email address

+ 5
- 4
apps/files/src/actions/deleteAction.spec.ts View 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')

+ 4
- 3
apps/files/src/actions/deleteAction.ts View 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')

Loading…
Cancel
Save