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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user