Skip to content

Do not automatically add "update" permission to shared mounts - #15063

Merged
MorrisJobke merged 1 commit into
masterfrom
share-readonlyfile-permissions
Mar 20, 2015
Merged

MorrisJobke merged 1 commit into
masterfrom
share-readonlyfile-permissions

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

In the past it seems the update permission was needed to be able to
rename shared mounts, but it doesn't seem to be the case any more.

Removing the "update" permission that used to be added automatically
fixes the read-only permission check when trying to overwrite a
read-only file over WebDAV.

Fixes #15026

Please review @schiesbn @icewind1991 @nickvergessen @MorrisJobke

Tests

  • overwrite read-only shared file with WebDAV returns 403 (no more 500)
  • overwrite read-write shared file with WebDAV still works
  • can rename/move read-write shared file as recipient
  • can rename/move read-only shared file as recipient
  • can rename/move read-write shared folder as recipient
  • can rename/move read-only shared folder as recipient
  • can still reshare all of the above

In the past it seems the update permission was needed to be able to
rename shared mounts, but it doesn't seem to be the case any more.

Removing the "update" permission that used to be added automatically
fixes the read-only permission check when trying to overwrite a
read-only file over WebDAV.
@nickvergessen

Copy link
Copy Markdown
Contributor

Does this need a change in the node api aswell?

@karlitschek

Copy link
Copy Markdown
Contributor

makes sense 👍

@PVince81

Copy link
Copy Markdown
Contributor Author

@nickvergessen I don't think so, since the Node API also uses the view to get the file info.
Or did you find any specific similar code there?

@nickvergessen

Copy link
Copy Markdown
Contributor

No, was just blind guessing

@ghost

ghost commented Mar 20, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/10667/
Test PASSed.

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 2 new issues

@icewind1991

Copy link
Copy Markdown
Contributor

Code looks good, seems to work fine 👍

MorrisJobke added a commit that referenced this pull request Mar 20, 2015
Do not automatically add "update" permission to shared mounts
@MorrisJobke
MorrisJobke merged commit 7ea5c47 into master Mar 20, 2015
@MorrisJobke
MorrisJobke deleted the share-readonlyfile-permissions branch March 20, 2015 13:06
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 12, 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.

Overwrite readonly shared file over Webdav gives 500 instead of 403

6 participants