Allow deleting access review campaigns in any status
Drop the backend status gate on campaign delete and show delete in the console whenever the user has delete permission, regardless of whether the campaign is draft, in progress, or completed. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
@@ -57,15 +57,6 @@ func TestCampaignClientErrors(t *testing.T) {
|
||||
wantText: fmt.Sprintf("access review campaign %q is not in draft", campaignID),
|
||||
sentinel: accessreview.ErrCampaignNotDraft,
|
||||
},
|
||||
{
|
||||
name: "not deletable",
|
||||
err: accessreview.NewCampaignNotDeletableError(campaignID),
|
||||
wantText: fmt.Sprintf(
|
||||
"access review campaign %q cannot be deleted unless it is draft, cancelled, or completed",
|
||||
campaignID,
|
||||
),
|
||||
sentinel: accessreview.ErrCampaignNotDeletable,
|
||||
},
|
||||
{
|
||||
name: "not pending actions",
|
||||
err: accessreview.NewCampaignNotPendingActionsError(campaignID),
|
||||
|
||||
Reference in New Issue
Block a user