feature/AB#30415 - Modular Applicant Permissions - #2870
Conversation
…ar-applicant-permissions-merge-fix
1 similar comment
There was a problem hiding this comment.
Pull request overview
Introduces modular applicant-management permissions across the web UI, application services, and default role grants.
Changes:
- Adds granular permissions for applicant sections and operations.
- Applies permission-aware tabs, controls, zones, and partial updates.
- Adjusts exception monitoring and local migrator configuration.
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
ApplicationBreadcrumbWidget/Default.cshtml |
Migrates applicant-view authorization. |
ApplicantsActionBar/Default.cshtml |
Adds granular action permissions. |
ApplicantOrganizationInfo/Default.cshtml |
Adds permission-aware information zones. |
ApplicantHistory/Default.js |
Sends partial note updates. |
ApplicantHistory/Default.cshtml |
Adds history-zone permissions. |
ApplicantContacts/ApplicantContactsViewComponent.cs |
Migrates contact editing permission. |
ApplicantAddresses/Default.js |
Restricts tracked address fields. |
ApplicantAddresses/Default.cshtml |
Adds address fieldsets and permission model. |
ApplicantAddresses/ApplicantAddressesViewModel.cs |
Renames address-edit capability. |
ApplicantAddresses/ApplicantAddressesViewComponent.cs |
Checks modular address permission. |
ZoneRequirementType.cs |
Defines zone requirement modes. |
UnityZoneTagHelperService.cs |
Supports permission-only and toggle-only zones. |
UnityZoneTagHelper.cs |
Exposes zone type configuration. |
GrantApplications/Index.js |
Migrates applicant-link permission. |
Applicants/Index.cshtml.cs |
Migrates page authorization. |
Applicants/Details.cshtml.cs |
Migrates details-page authorization. |
Applicants/Details.cshtml |
Gates applicant sections by permission. |
ApplicantContact/EditModal.cshtml.cs |
Secures contact editing modal. |
ExceptionCounterMiddleware.cs |
Changes notification environments. |
ErrorCountingLoggerSink.cs |
Alters error sink execution. |
AbpExceptionNotificationSubscriber.cs |
Changes notification environments. |
GrantManagerMenuContributor.cs |
Migrates applicant menu permission. |
PermissionGrantsDataSeeder.cs |
Grants new permissions to default roles. |
en.json |
Adds applicant-permission labels. |
DbMigrator/appsettings.json |
Changes local database credentials. |
ApplicantAppService.cs |
Adds granular update, merge, address, and delete authorization. |
ApplicantHistoryAppService.cs |
Adds history permissions and partial note persistence. |
ApplicantContactAppService.cs |
Migrates contact-service authorization. |
GrantApplicationPermissionDefinitionProvider.cs |
Registers modular applicant permissions. |
SaveApplicantHistoryNotesDto.cs |
Adds modified-field tracking. |
UnitySelector.ApplicantManagement.cs |
Defines applicant permission constants. |
PaymentRequests/Index.js |
Migrates applicant-link permission. |
Suppressed comments (2)
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/Applicants/Details.cshtml:145
- The
true ||bypass means the History tab is rendered regardless ofHistory.Default. Remove the unconditional operand so the newly introduced view permission actually controls access to this tab.
@if (true || await PermissionChecker.IsGrantedAsync(UnitySelector.ApplicantManagement.History.Default))
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Views/Shared/Components/ApplicantAddresses/Default.cshtml:72
- As above, this wrapper implicitly checks for a permission named
PrimaryMailingAddress, which is undefined, so the mailing-address form is always suppressed. Bind it to the actual applicant-address permissions.
<zone-fieldset id="PrimaryMailingAddress" class="row m-0 mailing-address-form ps-2" style="border-bottom:none;">
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This reverts commit 7a50c29.
…ar-applicant-permissions-merge-fix
…ar-applicant-permissions-merge-fix
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 37 changed files in this pull request and generated 3 comments.
Suppressed comments (1)
applications/Unity.GrantManager/src/Unity.GrantManager.Application/Applicants/ApplicantAppService.cs:708
UpdateApplicantIdAsyncis exposed as a remote service and now only requires authentication ([Authorize]). This endpoint mutates application/applicant relationships and related records, so any authenticated caller could potentially reassign applicants to applications unless an explicit merge/assignment authorization check is performed in the method body.
[RemoteService(true)]
[Authorize]
public async Task UpdateApplicantIdAsync(UpdateApplicantIdDto dto)
{
// Validate input
if (dto == null)
{
Logger.LogWarning("UpdateApplicantIdAsync called with null dto.");
return;
}
//Update Application
var application = await applicationRepository.GetAsync(dto.ApplicationId);
if (application == null)
{
Logger.LogWarning("Application not found for ApplicationId: {ApplicationId}", dto.ApplicationId);
return;
}
var oldApplicantId = application.ApplicantId;
if (oldApplicantId == dto.ApplicantId)
{
Logger.LogInformation("ApplicantId is already set to the requested value. No update required.");
return;
}
application.ApplicantId = dto.ApplicantId;
await applicationRepository.UpdateAsync(application);
//Update ApplicationFormSubmissions
await UpdateApplicationFormSubmissionsAsync(dto.ApplicationId, dto.ApplicantId);
//Update ApplicantAgent records
await UpdateApplicantAgentRecordsAsync(oldApplicantId, dto.ApplicantId, dto.ApplicationId);
//Update ApplicantAddresses records
await UpdateApplicantAddressRecords(oldApplicantId, dto.ApplicantId, dto.ApplicationId);
}
|



Pull request overview
Introduces modular applicant-management permissions across the web UI, application services, and default role grants.
Changes:
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 7 comments.
Show a summary per file
ApplicationBreadcrumbWidget/Default.cshtmlApplicantsActionBar/Default.cshtmlApplicantOrganizationInfo/Default.cshtmlApplicantHistory/Default.jsApplicantHistory/Default.cshtmlApplicantContacts/ApplicantContactsViewComponent.csApplicantAddresses/Default.jsApplicantAddresses/Default.cshtmlApplicantAddresses/ApplicantAddressesViewModel.csApplicantAddresses/ApplicantAddressesViewComponent.csZoneRequirementType.csUnityZoneTagHelperService.csUnityZoneTagHelper.csGrantApplications/Index.jsApplicants/Index.cshtml.csApplicants/Details.cshtml.csApplicants/Details.cshtmlApplicantContact/EditModal.cshtml.csExceptionCounterMiddleware.csErrorCountingLoggerSink.csAbpExceptionNotificationSubscriber.csGrantManagerMenuContributor.csPermissionGrantsDataSeeder.csen.jsonDbMigrator/appsettings.jsonApplicantAppService.csApplicantHistoryAppService.csApplicantContactAppService.csGrantApplicationPermissionDefinitionProvider.csSaveApplicantHistoryNotesDto.csUnitySelector.ApplicantManagement.csPaymentRequests/Index.js