Uh oh!
There was an error while loading. Please reload this page.
files_external: proper user context for sharing - #16525
Conversation
juliusknorr
commented
Jul 24, 2019
/backport to stable16 |
blizzz
commented
Jul 24, 2019
That's a good catch already. Another use case are internal shares with placeholders in the config. They also don't resolve because of the wrong replacement it seems. |
Just tested the PR and it solves partially the issues referenced. Shared files with path containing $user variable work fine now, but opening them with onlyoffice still broken (download failed). As before, same file without $user in path opens fine. |
juliusknorr
commented
Jul 25, 2019
Hm, then I think it would be better if we pass though the user id that is used to setup the storage (as it seems that it was in stable15 and before). I'll have another look. |
@blizzz I've pushed another commit so we reuse the user id that is used to setup the mountpoints from server/lib/private/Files/Filesystem.php Line 395 in 1b85ef4 @scanom I don't have a only office test setup, so maybe you can give that another try. At least for collabora this works just fine now. |
blizzz
commented
Jul 25, 2019
@juliushaertl let me test it today |
juliusknorr
commented
Jul 25, 2019
Seems the tests also need another look 🤔 Not sure why they don't run yet. |
Uh oh!
There was an error while loading. Please reload this page.
scanom
commented
Jul 25, 2019
@juliushaertl PR working flawlessly now, checked both Onlyoffice and Collabora. |
blizzz
commented
Jul 25, 2019
Issue persists for me, but it seems the issue is deeper. The wrong storage is used when looking for the file id. Still debugging. |
blizzz
commented
Jul 25, 2019
There was an adjustment on the home handler needed, could have seen it way earlier. Stupid me. |
MorrisJobke
commented
Jul 29, 2019
CI fails :/ |
juliusknorr
commented
Jul 29, 2019
Still not sure why that happens. Could it be that phpunit is not figuring out the proper type hints since it is in the constructor parent class (UserContext)? |
469f055 to
908dd01Comparejuliusknorr
commented
Jul 30, 2019
Tests should be fine now ... stupid typos. |
There was a problem hiding this comment.
my commits got lost
and I think also something of yours, @juliushaertl, because I don't get the share owning user anymore. I don't recall what the change was here and I overwrote my local copy with this state :(
juliusknorr
commented
Aug 2, 2019
Hm, not sure what happened, because I had your commits locally as I tested them. Github still has them, let try to grab them |
…ution of variables Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
ae2fcd7 to
bd08902Comparejuliusknorr
commented
Aug 2, 2019
@blizzz Restored |
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
backport to stable16 in #16637 |
This will make sure we also have a proper user context for non-logged in users that access the instance though share links. Otherwise the file system setup doesn't work properly for share links, if either a $home or $user variable is configured for substitution.
Steps to reproduce: