Fix missing policy

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-01-18 08:32:37 -08:00
parent 7e2e16034e
commit 00bbd04e7d
4 changed files with 9 additions and 3 deletions

View File

@@ -318,7 +318,7 @@ func (s *DataProtectionImpactAssessmentService) ExportPDF(
}
if len(assessments) == 0 {
return coredata.ErrResourceNotFound
return fmt.Errorf("no data protection impact assessments found: %w", coredata.ErrResourceNotFound)
}
organization := &coredata.Organization{}

View File

@@ -93,6 +93,12 @@ var ViewerPolicy = policy.NewPolicy(
policy.Allow(
ActionDocumentVersionExportPDF, ActionDocumentVersionExportSignable, ActionDocumentVersionSign,
).WithSID("document-signing").When(organizationCondition),
policy.Allow(
ActionProcessingActivityExport,
ActionDataProtectionImpactAssessmentExport,
ActionTransferImpactAssessmentExport,
).WithSID("processing-activity-export").When(organizationCondition),
).WithDescription("Read-only probo access for organization viewers")
// AuditorPolicy defines permissions for auditor role.

View File

@@ -404,7 +404,7 @@ func (s *ProcessingActivityService) ExportPDF(
}
if len(processingActivities) == 0 {
return coredata.ErrResourceNotFound
return fmt.Errorf("no processing activities found: %w", coredata.ErrResourceNotFound)
}
organization := &coredata.Organization{}

View File

@@ -318,7 +318,7 @@ func (s *TransferImpactAssessmentService) ExportPDF(
}
if len(assessments) == 0 {
return coredata.ErrResourceNotFound
return fmt.Errorf("no transfer impact assessments found: %w", coredata.ErrResourceNotFound)
}
organization := &coredata.Organization{}