Skip to content

removing soft quota and renmaing hard quota to id_quota#1836

Merged
david-rocca merged 3 commits into
devfrom
dr_remove_soft_quota
Jun 3, 2026
Merged

removing soft quota and renmaing hard quota to id_quota#1836
david-rocca merged 3 commits into
devfrom
dr_remove_soft_quota

Conversation

@david-rocca

@david-rocca david-rocca commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Remove soft quota and rename registry hard_quota to id_quota.

Summary

Removes soft_quota from registry organization surfaces and renames registry hard_quota to id_quota across models, schemas, controllers, repositories, docs, migrations, and tests.

Important Changes

src/model/cnaorg.js, src/model/adporg.js, src/model/secretariatorg.js

  • Removed soft_quota.
  • Renamed registry quota storage from hard_quota to id_quota.

src/repositories/baseOrgRepository.js

  • Updated registry/legacy org quota conversion to use registry id_quota.
  • Updated create, update, and quota response logic to return id_quota.

src/controller/org.controller/index.js

  • Renamed registry quota endpoint from /registry/org/:shortname/hard_quota to /registry/org/:shortname/id_quota.

schemas/registry-org/*.json, api-docs/openapi.json

  • Updated registry org schemas and OpenAPI docs to use id_quota.
  • Removed soft_quota from registry org schema responses.

src/scripts/migrate.js

  • Updated migration output to write id_quota.

test/integration-tests/**, test/unit-tests/org/orgCreateTest.js

  • Updated quota assertions and request payloads to use id_quota.
  • Added coverage that rejects soft_quota in registry org creation.

Testing

Steps to manually test updated functionality, if possible

  • 1) Create a registry CNA org with id_quota and verify the response includes id_quota.
  • 2) Get /api/registry/org/{shortname}/id_quota and verify the response includes id_quota, total_reserved, and available.
  • 3) Attempt to create a registry org with soft_quota and verify the API returns 400.
  • 4) Run bash -i -c "npm run test:integration".

@jdalphond-mitre jdalphond-mitre self-requested a review June 3, 2026 19:09
@jdalphond-mitre

Copy link
Copy Markdown
Collaborator

This looks good to me

@jdalphond-mitre jdalphond-mitre left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@CVEProject CVEProject deleted a comment from donniepuff Jun 3, 2026
@david-rocca david-rocca merged commit cffcc6a into dev Jun 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants