diff --git a/changelog/unreleased/bugfix-disable-rename-in-ppf b/changelog/unreleased/bugfix-disable-rename-in-ppf new file mode 100644 index 00000000000..a9a70697471 --- /dev/null +++ b/changelog/unreleased/bugfix-disable-rename-in-ppf @@ -0,0 +1,8 @@ +Bugfix: Disable rename action in password-protected folder view + +We've fixed a bug where renaming a folder from inside a password-protected +folder view would create a duplicate folder instead of renaming the original. +The rename action is now hidden in public link contexts, which aligns with +the documented behavior that link files should not be manipulated from this view. + +https://github.com/owncloud/web/issues/12365 diff --git a/packages/web-pkg/src/composables/actions/files/useFileActionsRename.ts b/packages/web-pkg/src/composables/actions/files/useFileActionsRename.ts index a7b2b4a187d..7eff72ec652 100644 --- a/packages/web-pkg/src/composables/actions/files/useFileActionsRename.ts +++ b/packages/web-pkg/src/composables/actions/files/useFileActionsRename.ts @@ -1,5 +1,9 @@ import { isSameResource } from '../../../helpers/resource' -import { isLocationTrashActive, isLocationSharesActive } from '../../../router' +import { + isLocationTrashActive, + isLocationSharesActive, + isLocationPublicActive +} from '../../../router' import { Resource } from '@ownclouders/web-client' import { dirname, join } from 'path' import { WebDAV } from '@ownclouders/web-client/webdav' @@ -218,6 +222,10 @@ export const useFileActionsRename = () => { if (isLocationTrashActive(router, 'files-trash-generic')) { return false } + + if (isLocationPublicActive(router, 'files-public-link')) { + return false + } if ( isLocationSharesActive(router, 'files-shares-with-me') && !capabilityStore.sharingCanRename