fix permission bits when enforcing rw links#40701
Conversation
|
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. |
|
💥 Acceptance tests pipeline webUISettingsMenu-chrome-mariadb10.2-php7.4 failed. The build has been cancelled. |
|
I restarted CI. At least one of the pipelines had a problem fetching its docker images. It should run soon, after the various nightly pipelines are finished and there are docker agents available. |
|
https://drone.owncloud.com/owncloud/core/38138/9/7 |
|
This will probably also need changelog. |
|
@jnweiger let me also review this, just to make sure it wont introduce some more regressions that are not covered with enough tests. |
|
@mrow4a CI is now happy. Review it? |
|
@jnweiger @pako81 ok, so the logic must match both server side and client side: Also we need to make sure all cases are covered (both folder and file). I will add commits to this change. |
|
@mrow4a you can see in the initial post, 'How Has This Been Tested' what I tested. |
|
it works, because this checks what should NOT require password. I am also investigation whether something else should be considered. |
821835a to
9d95f72
Compare
|
Kudos, SonarCloud Quality Gate passed! |
|
@mrow4a Thank you! That is much cleaner now: Better and consistent naming, js and php "obviously" do the same logic now. All cases explicit (that always puzzled me). |
|
Tested all my combinations from the initial comment, and a few more. We now have: I'd argue that controlling this case with the setting [x] Enforce password protection for read + write links Everything else works as expected. |
|
@jnweiger so one detail, for the shares on a file, delete permission is always there. As you can delete a share which is basically unmount. I understand this is confusing, but it is as is. |
|
Ah, understand. Deleting the share is a permission. Well, that is not exactly deleting the file. But makes sense from an end user perspective. |








Description
The bits READ UPDATE CREATE DELETE are used to differentiate the differnrt types of shares.
passwordMustBeEnforced() maps these bits to the read-only, read-write, read-write-delete, write-only settings.
This code is used for both, files and foldes. with files, the logic was wrong, in such a way, that no setting would enforce passwords on a Download/View/Edit type file share.
Related Issue
Motivation and Context
How Has This Been Tested?
keyboard + hands + eyes
Screenshots (if appropriate):
Types of changes
Checklist: