Remove access review framework controls
Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
committed by
Bryan Frimin
parent
9822b39ece
commit
79285d97df
@@ -736,7 +736,6 @@ func (r *mutationResolver) CreateAccessReviewCampaign(ctx context.Context, input
|
||||
OrganizationID: input.OrganizationID,
|
||||
Name: input.Name,
|
||||
Description: description,
|
||||
FrameworkControls: input.FrameworkControls,
|
||||
AccessReviewSourceIDs: input.AccessReviewSourceIds,
|
||||
},
|
||||
)
|
||||
@@ -762,10 +761,9 @@ func (r *mutationResolver) UpdateAccessReviewCampaign(ctx context.Context, input
|
||||
ctx,
|
||||
scope,
|
||||
accessreview.UpdateAccessReviewCampaignRequest{
|
||||
CampaignID: input.AccessReviewCampaignID,
|
||||
Name: gqlutils.UnwrapOmittable(input.Name),
|
||||
Description: gqlutils.UnwrapOmittable(input.Description),
|
||||
FrameworkControls: gqlutils.UnwrapOmittable(input.FrameworkControls),
|
||||
CampaignID: input.AccessReviewCampaignID,
|
||||
Name: gqlutils.UnwrapOmittable(input.Name),
|
||||
Description: gqlutils.UnwrapOmittable(input.Description),
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
@@ -349,7 +349,6 @@ type AccessReviewCampaign implements Node {
|
||||
status: AccessReviewCampaignStatus!
|
||||
startedAt: Datetime
|
||||
completedAt: Datetime
|
||||
frameworkControls: [String!]
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
|
||||
@@ -578,7 +577,6 @@ input CreateAccessReviewCampaignInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
description: String
|
||||
frameworkControls: [String!]
|
||||
accessReviewSourceIds: [ID!]
|
||||
}
|
||||
|
||||
@@ -590,7 +588,6 @@ input UpdateAccessReviewCampaignInput {
|
||||
accessReviewCampaignId: ID!
|
||||
name: String @goField(omittable: true)
|
||||
description: String @goField(omittable: true)
|
||||
frameworkControls: [String!] @goField(omittable: true)
|
||||
}
|
||||
|
||||
type UpdateAccessReviewCampaignPayload {
|
||||
|
||||
@@ -215,14 +215,13 @@ func NewAccessReviewCampaign(c *coredata.AccessReviewCampaign) *AccessReviewCamp
|
||||
Organization: &Organization{
|
||||
ID: c.OrganizationID,
|
||||
},
|
||||
Name: c.Name,
|
||||
Description: c.Description,
|
||||
Status: c.Status,
|
||||
StartedAt: c.StartedAt,
|
||||
CompletedAt: c.CompletedAt,
|
||||
FrameworkControls: c.FrameworkControls,
|
||||
CreatedAt: c.CreatedAt,
|
||||
UpdatedAt: c.UpdatedAt,
|
||||
Name: c.Name,
|
||||
Description: c.Description,
|
||||
Status: c.Status,
|
||||
StartedAt: c.StartedAt,
|
||||
CompletedAt: c.CompletedAt,
|
||||
CreatedAt: c.CreatedAt,
|
||||
UpdatedAt: c.UpdatedAt,
|
||||
}
|
||||
|
||||
return campaign
|
||||
|
||||
@@ -3752,7 +3752,6 @@ func (r *Resolver) CreateAccessReviewCampaignTool(ctx context.Context, req *mcp.
|
||||
OrganizationID: input.OrganizationID,
|
||||
Name: input.Name,
|
||||
Description: description,
|
||||
FrameworkControls: input.FrameworkControls,
|
||||
AccessReviewSourceIDs: input.AccessReviewSourceIds,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -3784,22 +3783,6 @@ func (r *Resolver) UpdateAccessReviewCampaignTool(ctx context.Context, req *mcp.
|
||||
updateReq.Description = &input.Description
|
||||
}
|
||||
|
||||
if rawControls := UnwrapOmittable(input.FrameworkControls); rawControls != nil {
|
||||
if *rawControls != nil {
|
||||
controls := make([]string, 0, len(**rawControls))
|
||||
for _, v := range **rawControls {
|
||||
if s, ok := v.(string); ok {
|
||||
controls = append(controls, s)
|
||||
}
|
||||
}
|
||||
|
||||
updateReq.FrameworkControls = &controls
|
||||
} else {
|
||||
empty := []string{}
|
||||
updateReq.FrameworkControls = &empty
|
||||
}
|
||||
}
|
||||
|
||||
campaign, err := r.accessReview.UpdateCampaign(ctx, scope, updateReq)
|
||||
if err != nil {
|
||||
return nil, types.UpdateAccessReviewCampaignOutput{}, fmt.Errorf("cannot update access review campaign: %w", err)
|
||||
|
||||
@@ -7644,11 +7644,6 @@ components:
|
||||
- "null"
|
||||
format: date-time
|
||||
description: Campaign completion time
|
||||
framework_controls:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Framework controls
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -8187,11 +8182,6 @@ components:
|
||||
description:
|
||||
type: string
|
||||
description: Campaign description
|
||||
framework_controls:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: Framework control references
|
||||
access_review_source_ids:
|
||||
type: array
|
||||
items:
|
||||
@@ -8220,15 +8210,6 @@ components:
|
||||
description:
|
||||
type: string
|
||||
description: New campaign description
|
||||
framework_controls:
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
items:
|
||||
type: string
|
||||
go.probo.inc/mcpgen/omittable: true
|
||||
description: Framework control references (set to null to clear)
|
||||
|
||||
UpdateAccessReviewCampaignMCPOutput:
|
||||
type: object
|
||||
required:
|
||||
|
||||
@@ -54,16 +54,15 @@ func NewListAccessReviewSourcesOutput(
|
||||
|
||||
func NewAccessReviewCampaign(c *coredata.AccessReviewCampaign) *AccessReviewCampaign {
|
||||
return &AccessReviewCampaign{
|
||||
ID: c.ID,
|
||||
OrganizationID: c.OrganizationID,
|
||||
Name: c.Name,
|
||||
Description: &c.Description,
|
||||
Status: c.Status,
|
||||
StartedAt: c.StartedAt,
|
||||
CompletedAt: c.CompletedAt,
|
||||
FrameworkControls: c.FrameworkControls,
|
||||
CreatedAt: c.CreatedAt,
|
||||
UpdatedAt: c.UpdatedAt,
|
||||
ID: c.ID,
|
||||
OrganizationID: c.OrganizationID,
|
||||
Name: c.Name,
|
||||
Description: &c.Description,
|
||||
Status: c.Status,
|
||||
StartedAt: c.StartedAt,
|
||||
CompletedAt: c.CompletedAt,
|
||||
CreatedAt: c.CreatedAt,
|
||||
UpdatedAt: c.UpdatedAt,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user