-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix permissions returned by getSharesInFolder #8305
Fix permissions returned by getSharesInFolder #8305
Conversation
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
Looks good |
So another server PR breaking things? :P Can we for the fun of it send a PR to talk to run integration tests against it? (Replace |
I would rather say exposing an existing issue... 😉
As I understand I do not have permissions to push to nextcloud/server or nextcloud/spreed directly. It seems however, that changing |
You are a member of our GitHub Organisation and therefor should have permissions to push branches just fine. |
Added a PR to test that branch at #8312 |
Confirmed broken in #8312 |
Fixes it as per #8312 So 👍 |
When working on nextcloud/server#34918, I have noticed that after applying changes proposed in that PR, incorrect permissions are returned for room shares.
This seems to be caused by the fact that the database query issued in RoomShareProvider::getSharesInFolder returnes two columns named
permissions
- one from theoc_shares
table and a second one fromoc_filecache
. Which column is then used by the PHP code probably depends on the database driver used and maybe some random factors. In my case (MariaDB) the wrong column was consistently used.In this PR I propose to change the SELECT part of the query to match other methods in the class - getSharesByIds and getSharedWith.
This change also means that the node data will be stored in the cache: https://github.com/nextcloud/spreed/blob/master/lib/Share/RoomShareProvider.php#L313, but I do not know what side effects this might introduce.