Skip to content
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

Use the user in request for deciding the layout for non-home DAV requests #1401

Merged
merged 2 commits into from
Jan 15, 2021

Conversation

ishank011
Copy link
Contributor

@ishank011 ishank011 commented Jan 15, 2021

For the incoming /dav/files/userID requests, we have different namespaces depending on whether the request is for the logged-in user's namespace or not. Since in the storage drivers, we specify the layout depending only on the user whose resources are to be accessed, this fails when a user wants to access another user's namespace when the storage provider depends on the logged in user's namespace.

For example, consider the following case. The owncloud fs uses a layout {{substr 0 1 .Username}}/{{.Username}} and it's mounted at /users. The user einstein sends a request to access a resource shared with him, say /dav/files/marie/abcd, which should be allowed. However, based on the way we applied the layout, this can only be translated to /users/e/marie/abcd.

Fixes #1215

@labkode
Copy link
Member

labkode commented Jan 15, 2021

The code and behaviour looks good to me, this will also allow oc web to access shared resources from the tab without having to mount them. @ishank011 some acceptance test are failing in CI

@ishank011
Copy link
Contributor Author

@labkode thanks for the quick review! That is just one test which is pretty unstable. I've retriggered the CI

@labkode labkode merged commit 47119be into cs3org:master Jan 15, 2021
Copy link
Contributor

@butonic butonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ishank011 ishank011 deleted the dav-ns branch January 15, 2021 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dav files namespace should use the user in request for deciding the layout
3 participants