Drop report org checks and noisy comments

Report access loads are already tenant-scoped; reject the
extra organization guard. Also remove the PortalAccessRequest
doc comment called out in review.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-27 18:00:23 +02:00
parent 14c9c921cc
commit 302175617f
2 changed files with 0 additions and 17 deletions

View File

@@ -35,9 +35,6 @@ import (
"go.probo.inc/probo/pkg/page"
)
// PortalAccessRequest carries the explicit resource IDs to request access for.
// Callers must supply at least one ID across the three slices; nil and empty
// both mean "none of that type" (there is no "request all" expansion).
type PortalAccessRequest struct {
CompliancePortalID gid.GID
IdentityID gid.GID

View File

@@ -1001,13 +1001,6 @@ func (r *mutationResolver) RequestReportAccess(ctx context.Context, input types.
return nil, gqlutils.Internal(ctx)
}
// GetAuditByReportFileID is only tenant-scoped, so a report belonging to
// another organization in the same tenant would otherwise be reachable.
// Reject it as not found before an access row can be written.
if audit.OrganizationID != compliancePortal.OrganizationID {
return nil, gqlutils.NotFoundf(ctx, "report %q not found", input.ReportID)
}
if audit.CompliancePortalVisibility == coredata.CompliancePortalVisibilityPublic {
return nil, gqlutils.Invalidf(
ctx,
@@ -1156,13 +1149,6 @@ func (r *mutationResolver) RequestAccesses(ctx context.Context, input types.Requ
return nil, gqlutils.Internal(ctx)
}
// GetAuditByReportFileID is only tenant-scoped, so a report belonging to
// another organization in the same tenant would otherwise be reachable.
// Reject it as not found before an access row can be written.
if audit.OrganizationID != compliancePortal.OrganizationID {
return nil, gqlutils.NotFoundf(ctx, "report %q not found", reportID)
}
if audit.CompliancePortalVisibility == coredata.CompliancePortalVisibilityPublic {
continue
}