bump reva

This commit is contained in:
André Duffeck
2025-08-05 17:12:58 +02:00
committed by Christian Richter
parent b9f48edd87
commit 0f09cdd8ec
7 changed files with 112 additions and 75 deletions
@@ -166,7 +166,6 @@ func (s *service) isPathAllowed(path string) bool {
func (s *service) CreateShare(ctx context.Context, req *collaboration.CreateShareRequest) (*collaboration.CreateShareResponse, error) {
log := appctx.GetLogger(ctx)
user := ctxpkg.ContextMustGetUser(ctx)
// Grants must not allow grant permissions
if HasGrantPermissions(req.GetGrant().GetPermissions().GetPermissions()) {
return &collaboration.CreateShareResponse{
@@ -174,6 +173,17 @@ func (s *service) CreateShare(ctx context.Context, req *collaboration.CreateShar
}, nil
}
// check if the grantee is a user or group
if req.GetGrant().GetGrantee().GetType() == provider.GranteeType_GRANTEE_TYPE_USER {
// check if the tenantId of the user matches the tenantId of the target user
if user.GetId().GetTenantId() != req.GetGrant().GetGrantee().GetUserId().GetTenantId() {
log.Warn().Msg("user tenantId does not match the target user tenantId, this is not supported yet")
return &collaboration.CreateShareResponse{
Status: status.NewPermissionDenied(ctx, nil, "user tenantId does not match the target user tenantId"),
}, nil
}
}
gatewayClient, err := s.gatewaySelector.Next()
if err != nil {
return nil, err