Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions service/policy/db/subject_mappings.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ func unmarshalSubjectSetsProto(conditionJSON []byte) ([]*policy.SubjectSet, erro
return ss, nil
}

var (
// TODO: remove once circular CI is resolved
deprecatedStandardActionDecrypt = policy.Action_STANDARD_ACTION_DECRYPT.String()
deprecatedStandardActionTransmit = policy.Action_STANDARD_ACTION_TRANSMIT.String()
)

/*
Subject Condition Sets
*/
Expand Down Expand Up @@ -268,13 +262,6 @@ func (c PolicyDBClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp
actionIDs = append(actionIDs, a.GetId())
case a.GetName() != "":
actionNames = append(actionNames, strings.ToLower(a.GetName()))
// TODO: remove this support for interpreting standard action proto enums to new CRUDable actions once circular CI testing is resolved
case a.GetStandard().String() == deprecatedStandardActionDecrypt:
c.logger.WarnContext(ctx, "standard action is deprecated, use 'id' or 'name' instead")
actionNames = append(actionNames, ActionRead.String())
case a.GetStandard().String() == deprecatedStandardActionTransmit:
c.logger.WarnContext(ctx, "standard action is deprecated, use 'id' or 'name' instead")
actionNames = append(actionNames, ActionCreate.String())
default:
return nil, db.WrapIfKnownInvalidQueryErr(
errors.Join(db.ErrMissingValue, fmt.Errorf("action at index %d missing required 'id' or 'name' when creating a subject mapping; action details: %+v", idx, a)),
Expand Down Expand Up @@ -475,13 +462,6 @@ func (c PolicyDBClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp
actionIDs = append(actionIDs, a.GetId())
case a.GetName() != "":
actionNames = append(actionNames, strings.ToLower(a.GetName()))
// TODO: remove this support for interpreting standard action proto enums to new CRUDable actions once circular CI testing is resolved
case a.GetStandard().String() == deprecatedStandardActionDecrypt:
c.logger.WarnContext(ctx, "standard action is deprecated, use 'id' or 'name' instead")
actionNames = append(actionNames, ActionRead.String())
case a.GetStandard().String() == deprecatedStandardActionTransmit:
c.logger.WarnContext(ctx, "standard action is deprecated, use 'id' or 'name' instead")
actionNames = append(actionNames, ActionCreate.String())
default:
return nil, db.WrapIfKnownInvalidQueryErr(
errors.Join(db.ErrMissingValue, fmt.Errorf("action at index %d missing required 'id' or 'name' when creating a subject mapping; action details: %+v", idx, a)),
Expand Down
Loading