Skip to content

Fallback to share link owner when no owner found#26587

Merged
DeepDiver1975 merged 1 commit into
masterfrom
trash-ext-link-uselinkowner
Nov 14, 2016
Merged

Fallback to share link owner when no owner found#26587
DeepDiver1975 merged 1 commit into
masterfrom
trash-ext-link-uselinkowner

Conversation

@PVince81

@PVince81 PVince81 commented Nov 9, 2016

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@DeepDiver1975 @jvillafanez @VicDeo

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 PVince81 added this to the 9.2 milestone Nov 9, 2016
@mention-bot

Copy link
Copy Markdown

@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.

@jvillafanez

Copy link
Copy Markdown
Member

What about anonymous users? I can link share a folder, allow editing, and anyone could delete files there. Is this taking into account?

@PVince81

Copy link
Copy Markdown
Contributor Author

@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 😄

@jvillafanez

Copy link
Copy Markdown
Member

ok, make sense. 👍

@DeepDiver1975

Copy link
Copy Markdown
Member

👍

@DeepDiver1975
DeepDiver1975 merged commit 0b91f8d into master Nov 14, 2016
@DeepDiver1975
DeepDiver1975 deleted the trash-ext-link-uselinkowner branch November 14, 2016 08:39
@DeepDiver1975 DeepDiver1975 self-assigned this Nov 14, 2016
DeepDiver1975 pushed a commit that referenced this pull request Nov 14, 2016
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.
@DeepDiver1975

DeepDiver1975 commented Nov 14, 2016

Copy link
Copy Markdown
Member

DeepDiver1975 pushed a commit that referenced this pull request Nov 14, 2016
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 pushed a commit that referenced this pull request Nov 14, 2016
…792c485f728925c2469

[stable9] Fallback to share link owner when no owner found (#26587)
PVince81 pushed a commit that referenced this pull request Nov 14, 2016
…92792c485f728925c2469

[stable9.1] Fallback to share link owner when no owner found (#26587)
@lock

lock Bot commented Aug 4, 2019

Copy link
Copy Markdown

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.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error deleting files in browser shared via link

4 participants