-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add INodeByPath to Directory #54441
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
Add INodeByPath to Directory #54441
Conversation
cad0ea3 to
87d9b88
Compare
f67982e to
c54b5c9
Compare
c54b5c9 to
cf952ce
Compare
|
Possible performance regression detected Show Output |
1 similar comment
|
Possible performance regression detected Show Output |
This comment was marked as outdated.
This comment was marked as outdated.
|
Possible performance regression detected Show Output |
|
Possible performance regression detected Show Output |
|
I converted the PR back to a draft because I ran into an issue with access control rules. Problem statementApps that rely on path navigation to perform checks that block an action could be broken with this PR. ExampleThe In the current implementation, the app relies on the fact that How to reproduce
Uploading should fail but succeeds instead Possible solution?Alter files_accesscontrolFor the case in the example, a fix could be to change Can someone come up with ideas on how to address this or other things that may break, so that if we try a new solution I can test it still works? |
a1a6278 to
cf952ce
Compare
b5977e7 to
831e780
Compare
85d8df5 to
cfba3f8
Compare
a61556d to
3959a22
Compare
3959a22 to
7ae8463
Compare
7ae8463 to
82e6de7
Compare
82e6de7 to
b2b60b5
Compare
|
Had to add a check for cc. @artonge |
415bccf to
02dd830
Compare
|
@icewind1991 this needs another review from you 🙏 The issue with files_accesscontrol has been solved by checking if all parent folders are readable, seems to be working well with group folders as well. A case that I was expecting to cause trouble with this PR also seems to have the same behaviour on master: within a group folder having a folder with read permissions removed for a specific user, but containing a file with read permissions allowed for the same user. This fails on master and on my PR, so from what I can test, this seems to be working well. The only drawback is that we lose the removal of the N+1 queries for navigating into deep folders, since navigating to the parents to check for readability will load their file infos. |
Signed-off-by: Salvatore Martire <[email protected]>
Signed-off-by: Salvatore Martire <[email protected]>
b73efca to
871262d
Compare
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
…sponse-code fix(DAV): Adjust expected response code after nextcloud/server#54441
Summary
Sabre has an interface
INodeByPaththat allows nodes to fetch a specific node by its path. This was not implemented in ourDirectoryclass, leading to any file query to fetch all parent nodes until the file node was reached. This PR makesDirectoryimplement that interface, extends makes the NCNodeclass extend theNodeclass from Sabre (required step).Before:

After:

Checklist