core
core copied to clipboard
TransferFiles To Custom Directory
Description
When you migrate a user via files:transfer-ownership, all files will end up in a subfolder , for example ; transferred from old-username on 2020618
.
Would be nice if the destination path becomes configurable, so that a transfer can end up elsewhere. For example in a subfolder with custom name or directly in the root when you move to a new account.
Related Issue
- Fixes https://github.com/owncloud/core/issues/38865
How Has This Been Tested?
- test environment: Acceptance environment
- test case 1: without arguments
- test case 2: with empty argument
- test case 3: with an argument
Screenshots (if appropriate):
root@vm-web-acc-01:/var/www/owncloud # sudo -u apache /usr/bin/php72 /var/www/owncloud/occ files:transfer-ownership --destination-path='' old-user new-user
Analysing files of [email protected] ...
13 [============================]
Collecting all share information for files and folder of old-user ...
0 [>---------------------------]
Transferring files to new-user/files/ ...
Restoring shares ...
0 [>---------------------------]
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Database schema changes (next release will require increase of minor version instead of patch)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)
Checklist:
- [ ] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised:
- [ ] Changelog item, see TEMPLATE
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.
Note: this can be tested by adding scenarios to https://github.com/owncloud/core/blob/master/tests/acceptance/features/cliMain/transfer-ownership.feature which will require adapting test code in https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/TransferOwnershipContext.php etc.
Docs relevant, pls file a issue in docs when close to merge. @EParzefall fyi
Regarding the definable path, pls write which restrictions or prerequisite(s) apply (eg, anywhere in the filesystem, access rights ect)
:boom: Acceptance tests webUISharingIntGroup1-chrome-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavOperations-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavLocks-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavMove2-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavProperties2-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests webUISettingsMenu-chrome-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiSharingNotificationsToShares-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests webUISharingAutocomp2-chrome-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests cliBackground-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests webUISharingAcceptSh-chrome-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiFederationToShares2-git-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavPreviews-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavLocks2-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests cliMain-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests webUICreateDelete-chrome-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiFederationToRoot1-latest-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavLocks3-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests webUIComments-chrome-mariadb10.2-php7.4 failed. The build is cancelled...
:boom: Acceptance tests apiWebdavProperties1-mariadb10.2-php7.4 failed. The build is cancelled...
I have rebased and squashed the commits. Rebasing was necessary due to: https://github.com/owncloud/core/pull/38973
To have a proper documentation preparation, pls tell the restrictions and examples of the paths used.
@micbar @pmaier1 please tell if this will go into 10.8 or not!
Please create a changelog before merging !
@T0mWz do you have any update on this?