Fix permissions returned by getSharesInFolder#8305
Fix permissions returned by getSharesInFolder#8305nickvergessen merged 1 commit intonextcloud:masterfrom starypatyk:bugfix/noid/permissions_get_shares_in_folder
Conversation
Signed-off-by: Dariusz Olszewski <[email protected]>
|
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_sharestable 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.