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