-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSP-1392: POST Permissions Endpoint #25
CSP-1392: POST Permissions Endpoint #25
Conversation
shaun-downey-education
commented
Jun 6, 2024
- Added a new endpoint to the PermissionsController.cs file to manage the adding a updating of provider permissions.
src/SFA.DAS.PR.Application/Common/Validators/OperationsValidator.cs
Outdated
Show resolved
Hide resolved
...A.DAS.PR.Application/Permissions/Commands/PostPermissions/PostPermissionsCommandValidator.cs
Outdated
Show resolved
Hide resolved
src/SFA.DAS.PR.Data/EntityConfiguration/PermissionsAuditConfiguration.cs
Outdated
Show resolved
Hide resolved
src/SFA.DAS.PR.Data/Repositories/AccountLegalEntityReadRepository.cs
Outdated
Show resolved
Hide resolved
src/SFA.DAS.PR.Api.UnitTests/Controllers/Permissions/PermissionsControllerPostTests.cs
Outdated
Show resolved
Hide resolved
...SFA.DAS.PR.Application/Permissions/Commands/PostPermissions/PostPermissionsCommandHandler.cs
Outdated
Show resolved
Hide resolved
...SFA.DAS.PR.Application/Permissions/Commands/PostPermissions/PostPermissionsCommandHandler.cs
Outdated
Show resolved
Hide resolved
...SFA.DAS.PR.Application/Permissions/Commands/PostPermissions/PostPermissionsCommandHandler.cs
Outdated
Show resolved
Hide resolved
...SFA.DAS.PR.Application/Permissions/Commands/PostPermissions/PostPermissionsCommandHandler.cs
Outdated
Show resolved
Hide resolved
...SFA.DAS.PR.Application/Permissions/Commands/PostPermissions/PostPermissionsCommandHandler.cs
Outdated
Show resolved
Hide resolved
src/SFA.DAS.PR.Api.UnitTests/Controllers/Permissions/PermissionsControllerGetTests.cs
Outdated
Show resolved
Hide resolved
src/SFA.DAS.PR.Api.UnitTests/Controllers/Permissions/PermissionsControllerTests.cs
Outdated
Show resolved
Hide resolved
…troller endpoint.
…iesReadRepository.cs & AccountLegalEntityReadRepository.cs.
…sions to add to array.
Task<AccountLegalEntity?> GetAccountLegalEntity(long accountLegalEntityId, CancellationToken cancellationToken); | ||
Task<List<AccountLegalEntity>> GetAccountLegalEntities(long accountId, CancellationToken cancellationToken); | ||
Task<bool> AccountLegalEntityExists(long accountLegalEntityId, CancellationToken cancellationToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially GetAccountLegalEntity
and AccountLegalEntityExists
are the same, a null check can be done instead of two separate methods
|
||
public interface IPermissionsAuditWriteRepository | ||
{ | ||
Task RecordPermissionsAudit(PermissionsAudit permissionsAudit, CancellationToken cancellationToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create instead of Record, we need to be consistent in this naming convention
{ | ||
public async Task RecordPermissionsAudit(PermissionsAudit permissionsAudit, CancellationToken cancellationToken) | ||
{ | ||
await providerRelationshipsDataContext.PermissionsAudit.AddAsync(permissionsAudit, cancellationToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again AddAsync is not needed here, this will result in additional thread for no benefit.
|