Feature/kitosudv 6135 isms supplier deletion warning#1394
Merged
strongmindsnan merged 56 commits intoMay 7, 2026
Merged
Conversation
This reverts commit e9705a4.
…https://github.com/Strongminds/kitos into feature/kitosudv-6030-make-criticality-a-choice-type
…nto feature/kitosudv-6030-make-criticality-a-choice-type
…nto feature/kitosudv-6135-isms-supplier-deletion-warning
strongmindsnan
marked this pull request as draft
May 5, 2026 10:52
strongmindsnan
marked this pull request as ready for review
May 5, 2026 10:52
There was a problem hiding this comment.
Pull request overview
Moves system-usage “criticality” from the old GDPR enum field to a new option-based model, exposes it through V2 APIs/read models, and adds an internal supplier-usage lookup endpoint. This fits the codebase’s ongoing V2/API + EF Core migration work around system-usage metadata and option types.
Changes:
- Replaces
GdprCriticalitywithSystemUsageCriticalityLevelplus criticality documentation fields across domain, write flow, response mapping, and tests. - Adds global/local option-type support and external/internal controllers for system-usage criticality levels.
- Adds supplier “using organisations” lookup and updates read models/migrations to surface the new criticality data.
Reviewed changes
Copilot reviewed 52 out of 54 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests.Unit.Presentation.Web/Services/OrganizationSupplierServiceTest.cs | Adds unit coverage for supplier usage lookup. |
| Tests.Unit.Presentation.Web/Models/V2/ItSystemUsageWriteModelMapperTest.cs | Updates mapper tests for new general-section criticality fields and removed GDPR criticality. |
| Tests.Unit.Presentation.Web/Models/V2/ItSystemUsageResponseMapperTest.cs | Updates response-mapper assertions for criticality output. |
| Tests.Unit.Presentation.Web/Authorization/SupplierAssociatedFieldKeyMapperTest.cs | Updates supplier-field key mapping test to new criticality property. |
| Tests.Unit.Core.ApplicationServices/Model/ItSystemUsageTest.cs | Adds timestamp/documentation tests for criticality-related domain mutations. |
| Tests.Unit.Core.ApplicationServices/DomainServices/SystemUsage/ItSystemUsageOverviewReadModelUpdateTest.cs | Extends read-model update assertions for criticality level fields. |
| Tests.Unit.Core.ApplicationServices/ApplicationServices/SystemUsage/ItSystemUsageWriteServiceTest.cs | Adds create-path tests for criticality option handling and removes old GDPR criticality assertions. |
| Tests.Unit.Core.ApplicationServices/ApplicationServices/SystemUsage/ItSystemUsageServiceTest.cs | Updates permissions test to new criticality field key. |
| Tests.Integration.Presentation.Web/Tools/External/OptionV2ApiHelper.cs | Adds resource helper constant for criticality option API. |
| Tests.Integration.Presentation.Web/SystemUsage/V2/ItSystemUsageApiV2Test.cs | Removes old GDPR criticality integration assertion. |
| Tests.Integration.Presentation.Web/SystemUsage/V2/BaseItSystemUsageApiV2Test.cs | Stops populating removed GDPR criticality request field. |
| Tests.Integration.Presentation.Web/SystemUsage/ItSystemUsageOverviewReadModelsTest.cs | Updates overview read-model integration test to use criticality option type. |
| Tests.Integration.Presentation.Web/Organizations/V2/SupplierApiV2Test.cs | Removes old supplier-updatable GDPR criticality from integration test payload. |
| Presentation.Web/Models/API/V2/Types/SystemUsage/GdprCriticalityChoice.cs | Deletes obsolete external enum type. |
| Presentation.Web/Models/API/V2/Response/SystemUsage/GeneralDataResponseDTO.cs | Adds general response fields for criticality level and documentation. |
| Presentation.Web/Models/API/V2/Response/SystemUsage/GDPRRegistrationsResponseDTO.cs | Removes GDPR criticality from GDPR response model. |
| Presentation.Web/Models/API/V2/Request/SystemUsage/GeneralDataWriteRequestDTO.cs | Adds write-model fields for criticality level selection and documentation link. |
| Presentation.Web/Models/API/V2/Request/SystemUsage/GDPRWriteRequestDTO.cs | Removes obsolete GDPR criticality request field. |
| Presentation.Web/Infrastructure/DI/KitosServiceRegistration.cs | Registers services for new global/local criticality option types. |
| Presentation.Web/Controllers/API/V2/Internal/Organizations/OrganizationSupplierInternalV2Controller.cs | Adds internal endpoint for supplier using-organisations lookup. |
| Presentation.Web/Controllers/API/V2/Internal/Organizations/OrganizationsInternalV2Controller.cs | Cleans unused imports. |
| Presentation.Web/Controllers/API/V2/Internal/LocalOptionTypes/ItSystems/ItSystemLocalSystemUsageCriticalityLevelTypesInternalV2Controller.cs | Adds internal local option controller for criticality levels. |
| Presentation.Web/Controllers/API/V2/Internal/GlobalOptionTypes/ItSystems/ItSystemGlobalGdprCriticalityTypesInternalV2Controller.cs | Adds internal global option controller for criticality levels. |
| Presentation.Web/Controllers/API/V2/External/ItSystemUsages/Mapping/ItSystemUsageWriteModelMapper.cs | Maps new general criticality fields and removes old GDPR criticality mapping. |
| Presentation.Web/Controllers/API/V2/External/ItSystemUsages/Mapping/ItSystemUsageResponseMapper.cs | Emits new general criticality fields and drops old GDPR criticality response mapping. |
| Presentation.Web/Controllers/API/V2/External/ItSystemUsages/Mapping/GdprCriticalityChoiceMappingExtensions.cs | Deletes obsolete enum mapping helpers. |
| Presentation.Web/Controllers/API/V2/External/ItSystemUsages/ItSystemUsageV2Controller.cs | Cleans unused imports. |
| Presentation.Web/Controllers/API/V2/External/ItSystemUsages/ItSystemUsageCriticalityLevelTypeV2Controller.cs | Adds external option endpoint for criticality levels. |
| Presentation.Web/Controllers/API/V1/OData/ItSystemUsageOverviewReadModelsController.cs | Cleans unused imports. |
| Infrastructure.DataAccess/Migrations/EfCore/KitosContextModelSnapshot.cs | Updates EF Core snapshot for new option type and criticality columns. |
| Infrastructure.DataAccess/Migrations/EfCore/20260501103523_AddCriticalityLevelName_ToUsageReadModel.cs | Adds follow-up migration for read-model criticality name/documentation columns. |
| Infrastructure.DataAccess/Migrations/EfCore/20260430052516_MakeSystemUsageCriticalityChoiceType_InsteadOfGdprCriticalityEnum.cs | Main schema migration from enum criticality to option type. |
| Infrastructure.DataAccess/Mapping/SystemUsageCriticalityLevelMap.cs | Adds EF mapping for the new criticality option entity. |
| Infrastructure.DataAccess/Mapping/ItSystemUsageOverviewReadModelMap.cs | Replaces old GDPR criticality index with criticality-level UUID index. |
| Infrastructure.DataAccess/Mapping/ItSystemUsageMap.cs | Adds relation mapping for SystemUsageCriticalityLevel. |
| Infrastructure.DataAccess/KitosContextSeeder.cs | Seeds sample criticality options. |
| Infrastructure.DataAccess/KitosContext.cs | Adds DbSets/config for global and local criticality option types. |
| Core.DomainServices/SystemUsage/ItSystemUsageOverviewReadModelUpdate.cs | Pushes criticality level and documentation into the overview read model. |
| Core.DomainServices/Suppliers/SupplierFieldDomainService.cs | Repoints supplier-controlled field metadata to new criticality property. |
| Core.DomainModel/LocalOptions/LocalSystemUsageCriticalityLevel.cs | Adds local-option entity for criticality levels. |
| Core.DomainModel/ItSystemUsage/Read/ItSystemUsageOverviewReadModel.cs | Replaces old read-model GDPR criticality with new criticality fields. |
| Core.DomainModel/ItSystemUsage/ItSystemUsage.cs | Replaces old enum field with option reference and documentation fields. |
| Core.DomainModel/ItSystemUsage/GDPR/GdprCriticality.cs | Deletes obsolete domain enum. |
| Core.DomainModel/ItSystem/SystemUsageCriticalityLevel.cs | Adds global option entity for system-usage criticality levels. |
| Core.ApplicationServices/SystemUsage/Write/ItSystemUsageWriteService.cs | Adds write-path support for criticality level/documentation updates. |
| Core.ApplicationServices/Organizations/Write/OrganizationSupplierService.cs | Adds supplier usage lookup in application service. |
| Core.ApplicationServices/Organizations/Write/IOrganizationSupplierService.cs | Extends supplier service contract with usage lookup. |
| Core.ApplicationServices/Model/SystemUsage/Write/UpdatedSystemUsageGeneralProperties.cs | Adds general update parameters for criticality level and documentation. |
| Core.ApplicationServices/Model/SystemUsage/Write/UpdatedSystemUsageGDPRProperties.cs | Removes old GDPR criticality update parameter. |
| Core.ApplicationServices/Model/SystemUsage/Write/SystemUsageUpdateParameters.cs | Tracks changed general fields for new criticality properties. |
| Core.ApplicationServices/Mapping/Authorization/SupplierAssociatedFieldKeyMapper.cs | Updates supplier-field authorization mapping for criticality. |
| Core.ApplicationServices/Authorization/ModuleFieldsPermissionsResult.cs | Switches permissions lookup to the new criticality field key. |
strongmindsaln
approved these changes
May 7, 2026
strongmindsaln
approved these changes
May 7, 2026
strongmindsnan
deleted the
feature/kitosudv-6135-isms-supplier-deletion-warning
branch
May 7, 2026 08:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KITOS Pull request template
Description
Global admins are now warned when trying to delete an organization that is used as ISMS supplier, to avoid deleting ones that are in active use.
Checklist
The following procedure dictates the steps needed before a Pull request can be merged into master.
Implement:
All requirements are implemented and unit tests are green
Merge master into branch / rebase with master:
Make sure you are testing your changes and how they co-exist with the latest version of master
Green on integration:
All integration tests are green on integration
Add a description
Under "Description" above, explain what was changed in this branch, and WHY it was changed
Request review:
Tag whomever you wish to review your code
Review completed:
Reviewer ticks this box when review comments have been submitted
Changes:
PR owner and reviewer agrees on which changes must be made and the changes are committed.
Merge master into branch / rebase with master:
Make sure you are testing your changes and how they co-exist with the latest version of master
Green on integration:
All integration tests are green on integration