Skip to content

Keyboard copy, cut and paste skip the checks of the matching actions #3918

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Ctrl+C, Ctrl+X and Ctrl+V skip the isVisible/isDisabled checks of the matching file actions. web-app-files/src/composables/keyboardActions/useKeyboardFileActions.ts (Spaces overview, Favorites, Search) and useKeyboardFileSpaceActions.ts only check for vaults, so spaces, items without the needed permission and read-only targets go to the clipboard or get pasted. The server rejects them and a failure toast appears.

Fix: run the same checks as the context menu actions (useFileActionsCopy, cut/move, useFileActionsPaste) before copying, cutting or pasting.

Reproduction Steps

  1. Select a space in the Spaces overview, press Ctrl+C, open a folder and press Ctrl+V.
  2. Copy a file, open a read-only share and press Ctrl+V.
  3. Select an item without move permission and press Ctrl+X, then Ctrl+V in another folder.

Expected Outcome

Nothing happens where the context menu doesn't offer the action.

Actual Outcome

COPY /dav/spaces/<space> 400, COPY 403 or MOVE 403, each with a failure toast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions