Skip to content

Comments

feat(files): add --use-user-id option to transfer-ownership command#56664

Merged
sorbaugh merged 3 commits intonextcloud:masterfrom
cristianscheid:feat/54790/transfer-ownership-use-user-id
Dec 4, 2025
Merged

feat(files): add --use-user-id option to transfer-ownership command#56664
sorbaugh merged 3 commits intonextcloud:masterfrom
cristianscheid:feat/54790/transfer-ownership-use-user-id

Conversation

@cristianscheid
Copy link
Contributor

Summary

Adds the --use-user-id option to the occ files:transfer-ownership command, allowing administrators to use user IDs instead of display names when generating target folder names during ownership transfers.

This avoids ambiguity in environments where multiple users share the same display name, ensuring clear and consistent identification.

Changes

  • Added the --use-user-id option to the occ files:transfer-ownership command
  • Backward compatible: default behavior (using display names) remains unchanged

Behavior

Default (without flag):
Command: occ files:transfer-ownership source_user dest_user
default

With --use-user-id flag:
Command: occ files:transfer-ownership source_user dest_user --use-user-id
with_flag

Checklist

Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
@cristianscheid cristianscheid requested a review from a team as a code owner November 25, 2025 14:57
@cristianscheid cristianscheid requested review from come-nc, leftybournes, salmart-dev and yemkareems and removed request for a team November 25, 2025 14:57
@kesselb
Copy link
Contributor

kesselb commented Nov 26, 2025

Thanks for your pull request 👍

I wonder if we should always use the sourceId or maybe both "Displayname (userid)".

@cristianscheid
Copy link
Contributor Author

cristianscheid commented Nov 26, 2025

Thanks for the feedback @kesselb!

Using both display name and user ID (e.g. Bob Smith (bob)) sounds like a good approach to me, as it maintains the user-friendly aspect while solving the ambiguity issue.

Either way, implementing it with both by default or using only the user ID should be straightforward from an implementation perspective.

Happy to adjust the implementation based on what works best.

Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@provokateurin
Copy link
Member

cs-fixer needs to be executed

Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Cristian Scheid <74515775+cristianscheid@users.noreply.github.com>
@sorbaugh sorbaugh merged commit 86f0cbf into nextcloud:master Dec 4, 2025
175 of 178 checks passed
@sorbaugh
Copy link
Contributor

sorbaugh commented Dec 4, 2025

Congratulations @cristianscheid for the merge!

@cristianscheid
Copy link
Contributor Author

Thank you @sorbaugh! It was great working on this. Thanks to everyone for the reviews and feedback!

@cristianscheid cristianscheid deleted the feat/54790/transfer-ownership-use-user-id branch December 4, 2025 13:14
@github-actions
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --use-user-id flag to occ files:transfer-ownership command

6 participants