Treat invalid campaign sources as not found

Drop ErrCampaignSourceOrganizationMismatch. When a source ID is
missing or belongs to another organization, return
coredata.ErrResourceNotFound so clients get a generic not-found
response instead of leaking cross-organization details.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
Cursor Agent
2026-07-20 15:47:09 +00:00
parent 1dcfa31dab
commit eebc957d36
3 changed files with 28 additions and 25 deletions

View File

@@ -23,7 +23,6 @@ package accessreview
import "errors"
var (
ErrCampaignNoSourcesSelected = errors.New("cannot start campaign: no scope sources configured")
ErrCampaignNotDraft = errors.New("campaign must be in draft status")
ErrCampaignSourceOrganizationMismatch = errors.New("access source does not belong to the same organization")
ErrCampaignNoSourcesSelected = errors.New("cannot start campaign: no scope sources configured")
ErrCampaignNotDraft = errors.New("campaign must be in draft status")
)