-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
files_external: proper user context for sharing #16525
Conversation
/backport to stable16 |
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. |
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. |
@juliushaertl let me test it today |
Seems the tests also need another look 🤔 Not sure why they don't run yet. |
@juliushaertl PR working flawlessly now, checked both Onlyoffice and Collabora. |
Issue persists for me, but it seems the issue is deeper. The wrong storage is used when looking for the file id. Still debugging. |
There was an adjustment on the home handler needed, could have seen it way earlier. Stupid me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
CI fails :/ |
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
908dd01
Compare
Tests should be fine now ... stupid typos. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :(
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
bd08902
Compare
@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: