Skip to content

Commit

Permalink
fix(files): disable Unshare until proper fix
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <[email protected]>
  • Loading branch information
skjnldsv committed Jan 27, 2024
1 parent cfef434 commit d06ed4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions apps/files/src/actions/deleteAction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
7 changes: 4 additions & 3 deletions apps/files/src/actions/deleteAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit d06ed4d

Please sign in to comment.