Add support for mail grantees - #785
Open
rhafer wants to merge 7 commits into
Open
Conversation
rhafer
commented
Aug 25, 2026
rhafer
left a comment
Member
Author
There was a problem hiding this comment.
Here's some findings that a quick review with the help of opencode revealed. I haven't looked into them a depth. But I think they're mostly valid:
- High: pkg/storage/pkg/decomposedfs/spaces.go:897 indexes guest spaces by mail, but ListStorageSpaces only reads userSpaceIndex at line 348. Guests cannot discover granted project spaces.
- Medium: Guest emails are lowercased during persistence in pkg/storage/utils/ace/ace.go:220, but lookup and deletion use original casing at grants.go:330 and node/node.go:1315. Mixed-case guest grants cannot be updated or removed.
- Medium: Space purge removes user grants only from userSpaceIndex at spaces.go:792, leaving stale guest entries in mailSpaceIndex.
| if user.GetId().GetTenantId() != req.GetGrant().GetGrantee().GetUserId().GetTenantId() { | ||
| // check if the tenantId of the user matches the tenantId of the target user, skipping guests | ||
| if req.GetGrant().GetGrantee().GetUserId().GetType() != userpb.UserType_USER_TYPE_GUEST && | ||
| user.GetId().GetTenantId() != req.GetGrant().GetGrantee().GetUserId().GetTenantId() { |
Member
Author
There was a problem hiding this comment.
This doesn't align with how the grants are handled for guests. See AddGrant() in : pkg/storage/pkg/decomposedfs/grants.go
Also I am not really sure how we should handle guest invites in a multi-tenancy environment. Somehow I'd think that a guest should also be tied to a specific tenant. So we should remove this change.
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
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.
revived and rebased #616 on top of current master
This PR implements sharing with email addresses as per opencloud-eu/opencloud#2516