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

listing drives sould use the user filter #6103

Merged
merged 5 commits into from
Apr 28, 2023
Merged

Conversation

butonic
Copy link
Member

@butonic butonic commented Apr 20, 2023

when a user lists all spaces he has access to (unrestricted==false) we should send a user filter, so decomposedfs has a chance to use an index instead of iterating over ALL spaces.

part of todays tracing session, the reva part is in cs3org/reva#3809

blocked by cs3org/reva#3826
blocked by cs3org/reva#3827

@butonic butonic self-assigned this Apr 20, 2023
@update-docs
Copy link

update-docs bot commented Apr 20, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@butonic butonic force-pushed the drive-should-send-userfilter branch from 519d7ec to 558df1b Compare April 24, 2023 11:05
@ownclouders
Copy link
Contributor

ownclouders commented Apr 24, 2023

💥 Acceptance test localApiTests-apiGraph-ocis failed. Further test are cancelled...

@butonic
Copy link
Member Author

butonic commented Apr 24, 2023

@aduffeck duh we are not invalidating the filemetadata cache when deleting a space ... needs a reva fix

@butonic butonic force-pushed the drive-should-send-userfilter branch from 558df1b to b997ce6 Compare April 24, 2023 19:40
@butonic butonic changed the title listing drives shsould use the user filter listing drives sould use the user filter Apr 25, 2023
@@ -469,7 +479,7 @@ var _ = Describe("Graph", func() {
r := httptest.NewRequest(http.MethodPost, "/graph/v1.0/drives", bytes.NewBuffer(jsonBody)).WithContext(ctx)
rr := httptest.NewRecorder()
svc.CreateDrive(rr, r)
Expect(rr.Code).To(Equal(http.StatusUnauthorized))
Expect(rr.Code).To(Equal(http.StatusForbidden))
Copy link
Member Author

Choose a reason for hiding this comment

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

@micbar @aduffeck when a user does not have enough permissions the correct answer is forbidden, not unauthorized.

Copy link
Contributor

@aduffeck aduffeck left a comment

Choose a reason for hiding this comment

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

lgtm

@butonic butonic force-pushed the drive-should-send-userfilter branch from fd672dd to 7d5aa70 Compare April 26, 2023 13:24
@aduffeck aduffeck force-pushed the drive-should-send-userfilter branch 2 times, most recently from 547f22b to 422f671 Compare April 27, 2023 09:07
butonic and others added 4 commits April 27, 2023 12:38
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@butonic butonic force-pushed the drive-should-send-userfilter branch from 422f671 to 245d9dd Compare April 27, 2023 10:38
@butonic
Copy link
Member Author

butonic commented Apr 27, 2023

needs cs3org/reva#3826

@aduffeck aduffeck force-pushed the drive-should-send-userfilter branch 2 times, most recently from 7a75fdd to b074537 Compare April 28, 2023 06:43
@aduffeck aduffeck force-pushed the drive-should-send-userfilter branch from b074537 to 8cc57ba Compare April 28, 2023 07:11
@sonarcloud
Copy link

sonarcloud bot commented Apr 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

76.9% 76.9% Coverage
0.0% 0.0% Duplication

@butonic butonic merged commit 3489de1 into master Apr 28, 2023
@delete-merged-branch delete-merged-branch bot deleted the drive-should-send-userfilter branch April 28, 2023 08:06
ownclouders pushed a commit that referenced this pull request Apr 28, 2023
* listing drives shsould use the user filter

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix status code

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* check correct error

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* Adapt expected failures

* Bump reva

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: André Duffeck <andre.duffeck@firondu.de>
@butonic butonic mentioned this pull request May 2, 2023
89 tasks
@ScharfViktor ScharfViktor mentioned this pull request May 4, 2023
86 tasks
fschade pushed a commit that referenced this pull request Jul 10, 2023
* listing drives shsould use the user filter

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix status code

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* check correct error

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* Adapt expected failures

* Bump reva

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: André Duffeck <andre.duffeck@firondu.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants