Skip to content

Commit

Permalink
Merge pull request #50177 from nextcloud/fix/45982/hide-move-action
Browse files Browse the repository at this point in the history
  • Loading branch information
Antreesy authored Jan 15, 2025
2 parents 7689588 + 530b6f8 commit a16abfb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions apps/files/src/actions/moveOrCopyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ async function openFilePickerForAction(
return buttons
}

if (selection.some((node) => (node.permissions & Permission.CREATE) === 0)) {
// Missing 'CREATE' permissions for selected destination
return buttons
}

if (action === MoveCopyAction.MOVE || action === MoveCopyAction.MOVE_OR_COPY) {
buttons.push({
label: target ? t('files', 'Move to {target}', { target }, undefined, { escape: false, sanitize: false }) : t('files', 'Move'),
Expand Down
4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

0 comments on commit a16abfb

Please sign in to comment.