-
Notifications
You must be signed in to change notification settings - Fork 123
Show shares to project admins #5301
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as resolved.
This comment was marked as resolved.
2140d97 to
eb8ae15
Compare
0bca173 to
06d81ff
Compare
Some modifications to the ways shares are listed to allow project admins to view shares
This auto-injected filter was removed in the plugins by cernbox/reva-plugins#51
0491fbe to
13cbdeb
Compare
13cbdeb to
094a817
Compare
glpatcern
reviewed
Sep 23, 2025
Member
glpatcern
left a comment
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.
I think it's all fine, at least as far as I understand and followed the developments. Just a couple of comments
802b880 to
7d79c9f
Compare
glpatcern
reviewed
Sep 24, 2025
7d79c9f to
9778b65
Compare
glpatcern
reviewed
Sep 24, 2025
When you fetch a storage space, a Stat call happens to the root of the storage space to get the space's mtime. However, to allow project admins to fetch all shares, we would need to set the `.Space` property of a resource info in a Stat, which could lead to an infinite loop. Therefore, this commit only does the fetching of a space when a special value in the opaques is set. To do this efficiently, a space info cache was also added to the StorageProvider
9778b65 to
e7ade75
Compare
glpatcern
approved these changes
Sep 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows admins of a project to see all shares on resources in this project, not only their own ones.
To do this, we set the
.Spaceproperty of aResourceInfoon aStatto its respective space, which allows any caller to check if the current user is an admin of the project. This is only done if a specific key is set in the opaques of theStatRequest, to prevent fetching spaces when it is not needed, and to prevent infinite loops (since fetching a space will cause aStatto get themtimeof the space)Additionally, the cache has been changed to accept Generics, so that we could also introduce a cache for
StorageSpaces instead of onlyResourceInfos. These new ones are registered undermemory_spaceandredis_space.