Fallback to share link owner when no owner found#26587
Conversation
When creating link shares from external storage, the filesystem cannot find an owner in some scenarios (ex: system-wide mounts). In such cases, fall back to using the current user's trashbin which happens to also be the user who created the link share. Fixes an issue where this scenario made deletion impossible due to missing user information.
|
@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @schiessle, @icewind1991 and @Xenopathic to be potential reviewers. |
|
What about anonymous users? I can link share a folder, allow editing, and anyone could delete files there. Is this taking into account? |
|
@jvillafanez what do you mean with anonymous users ? In the case of a regular link share: if a user "user1" creates a link share and allows upload, then deleting files in that folder would make them land in the "user1" trashbin, because "user1" is the owner of the storage on which the shared folder is on. The problem that this PR solves is for storages that have no owner at all like system-wide external storages. Hope that clarifies a bit 😄 |
|
ok, make sense. 👍 |
|
👍 |
When creating link shares from external storage, the filesystem cannot find an owner in some scenarios (ex: system-wide mounts). In such cases, fall back to using the current user's trashbin which happens to also be the user who created the link share. Fixes an issue where this scenario made deletion impossible due to missing user information.
|
taking care of backports .. |
When creating link shares from external storage, the filesystem cannot find an owner in some scenarios (ex: system-wide mounts). In such cases, fall back to using the current user's trashbin which happens to also be the user who created the link share. Fixes an issue where this scenario made deletion impossible due to missing user information.
…792c485f728925c2469 [stable9] Fallback to share link owner when no owner found (#26587)
…92792c485f728925c2469 [stable9.1] Fallback to share link owner when no owner found (#26587)
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
When creating link shares from external storage, the filesystem cannot
find an owner in some scenarios (ex: system-wide mounts). In such
cases, fall back to using the current user's trashbin which happens to
also be the user who created the link share.
Fixes an issue where this scenario made deletion impossible due to
missing user information.
Related Issue
Fixes #25618
Motivation and Context
Because without this files cannot be deleted with link shares from ext storage.
How Has This Been Tested?
See steps in issue.
After the fix, the deleted file/folder can be found in the link owner's trashbin.
Screenshots (if appropriate):
Types of changes
Checklist:
@DeepDiver1975 @jvillafanez @VicDeo