Skip to content

Add new filter type for Spaceroots to share requests - #265

Merged
glpatcern merged 1 commit into
cs3org:mainfrom
rhafer:filter-spaceroot
Apr 22, 2026
Merged

glpatcern merged 1 commit into
cs3org:mainfrom
rhafer:filter-spaceroot

Conversation

@rhafer

@rhafer rhafer commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

This adds a new Filter type for the ListShares request. To be able to only List shares for SpaceRoots (i.e. Space memberships) and to be able to exclude SpaceRoot shares from the result.

To be able just list shared spaces or everything less but spaces
the TYPE_SPACE_ROOT filter can be used.

@micbar micbar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@glpatcern Fine from POV

@glpatcern glpatcern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks ok for the semantic, but it seems now we have ListStorageSpaces and this filter that return the same thing in different formats. Or am I missing something?

@rhafer

rhafer commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

Looks ok for the semantic, but it seems now we have ListStorageSpaces and this filter that return the same thing in different formats. Or am I missing something?

There is some overlap, yes. But IMO the ListShares provides a more convenient interface. For ListStorageSpaces our implementation is currently putting quite some stuff into the Opaque which are much easier to consume when using ListShares. Also things like "List all Space that I have share with somebody else" is easier to achieve via the ListShares call than via ListStorageSpaces.

As a side note: Up to now our implementation didn't manage space memberships via the shareprovider at all (while we're using the gateway's CreateShare call to add a member to a space, the gateway is currently "re-routing" that call to the storage provider) our plan is too clean that up, and this PR is basically part of that effort.

ListStorageSpaces is still useful. E.g. for adminstrative task (e.g. to get quota and other space metadata).

@glpatcern

Copy link
Copy Markdown
Member

OK fair enough, it still seems weird to have two APIs to do the same thing, I guess ListStorageSpaces needs some changes for you to avoid using the opaques (we use it without opaques). At the same time the filter here is fine, I'll merge it.

@glpatcern
glpatcern merged commit a313737 into cs3org:main Apr 22, 2026
2 checks passed
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.

3 participants