-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3346 from bcgov/release/uat_is57
UAT Release - IS56 & IS57
- Loading branch information
Showing
1,606 changed files
with
344,634 additions
and
65,570 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Keycloak Sync | ||
env: | ||
AUTH__KEYCLOAK__SECRET: ${{ secrets.KEYCLOAK_SECRET }} | ||
AUTH__KEYCLOAK__SERVICEACCOUNT__SECRET: ${{ secrets.KEYCLOAK_SERVICEACCOUNT_SECRET }} | ||
sync-directory: ./tools/keycloak/sync | ||
ASPNETCORE_ENVIRONMENT: ${{ inputs.TARGET_BRANCH }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
TARGET_BRANCH: | ||
description: "Enter the target branch (dev/test)" | ||
required: true | ||
|
||
jobs: | ||
sync-backend: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.TARGET_BRANCH }} | ||
|
||
- name: Set ASPNETCORE_ENVIRONMENT (dev) | ||
if: ${{ inputs.TARGET_BRANCH == 'dev' }} | ||
run: echo "ASPNETCORE_ENVIRONMENT=development" >> $GITHUB_ENV | ||
|
||
- name: Setup .NET 6 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: "6.0.x" | ||
|
||
- name: Install dependencies for keycloak sync | ||
run: dotnet restore | ||
working-directory: ${{env.sync-directory}} | ||
|
||
- name: Build keycloak sync | ||
run: dotnet build | ||
working-directory: ${{env.sync-directory}} | ||
|
||
- name: Start keycloak sync | ||
run: dotnet run | ||
working-directory: ${{env.sync-directory}} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,5 +49,6 @@ | |
"Xunit", | ||
"keycloak", | ||
"pims" | ||
] | ||
], | ||
"jest.rootPath": "./source/frontend/src" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
283,625 changes: 250,875 additions & 32,750 deletions
283,625
etl/PAIMS_PIMS_ACQUISITION/PAIMS_PIMS_ACQUISITION/PAIMS_ACQUISITION_TO_PIMS_DATASET.dtsx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
87 changes: 0 additions & 87 deletions
87
source/backend/api/Areas/Insurances/Controllers/InsuranceController.cs
This file was deleted.
Oops, something went wrong.
106 changes: 106 additions & 0 deletions
106
source/backend/api/Areas/Leases/Controllers/InsuranceController.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using MapsterMapper; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Extensions.Logging; | ||
using Pims.Api.Areas.Lease.Controllers; | ||
using Pims.Api.Models.Concepts; | ||
using Pims.Api.Policies; | ||
using Pims.Api.Services; | ||
using Pims.Core.Extensions; | ||
using Pims.Core.Json; | ||
using Pims.Dal.Entities; | ||
using Pims.Dal.Security; | ||
using Swashbuckle.AspNetCore.Annotations; | ||
|
||
namespace Pims.Api.Areas.Leases.Controllers | ||
{ | ||
/// <summary> | ||
/// InsuranceController class, provides endpoints for interacting with insurances. | ||
/// </summary> | ||
[Authorize] | ||
[ApiController] | ||
[ApiVersion("1.0")] | ||
[Area("insurances")] | ||
[Route("v{version:apiVersion}/leases/{leaseId}/[area]")] | ||
[Route("/leases/{leaseId}/[area]")] | ||
public class InsuranceController : ControllerBase | ||
{ | ||
#region Variables | ||
private readonly ILeaseService _leaseService; | ||
private readonly IMapper _mapper; | ||
private readonly ILogger _logger; | ||
#endregion | ||
|
||
#region Constructors | ||
|
||
/// <summary> | ||
/// Creates a new instance of a InsuranceController class, initializes it with the specified arguments. | ||
/// </summary> | ||
/// <param name="mapper"></param> | ||
/// <param name="leaseService"></param> | ||
/// <param name="logger"></param> | ||
/// | ||
public InsuranceController(IMapper mapper, ILeaseService leaseService, ILogger<InsuranceController> logger) | ||
{ | ||
_mapper = mapper; | ||
_leaseService = leaseService; | ||
_logger = logger; | ||
} | ||
#endregion | ||
|
||
#region Endpoints | ||
|
||
/// <summary> | ||
/// Updates a list of insurance for a lease. | ||
/// </summary> | ||
/// <returns></returns> | ||
[HttpPut] | ||
[HasPermission(Permissions.LeaseEdit)] | ||
[Produces("application/json")] | ||
[ProducesResponseType(typeof(IEnumerable<InsuranceModel>), 200)] | ||
[SwaggerOperation(Tags = new[] { "insurance" })] | ||
[TypeFilter(typeof(NullJsonResultFilter))] | ||
public IActionResult UpdateInsurance(int leaseId, IEnumerable<InsuranceModel> insurances) | ||
{ | ||
_logger.LogInformation( | ||
"Request received by Controller: {Controller}, Action: {ControllerAction}, User: {User}, DateTime: {DateTime}", | ||
nameof(InsuranceController), | ||
nameof(UpdateInsurance), | ||
User.GetUsername(), | ||
DateTime.Now); | ||
|
||
var updatedEntities = _leaseService.UpdateInsuranceByLeaseId(leaseId, _mapper.Map<IEnumerable<PimsInsurance>>(insurances)); | ||
|
||
var insuranceModels = _mapper.Map<IEnumerable<InsuranceModel>>(updatedEntities); | ||
|
||
return new JsonResult(insuranceModels); | ||
} | ||
|
||
/// <summary> | ||
/// Get a list of insurance for a lease. | ||
/// </summary> | ||
/// <returns></returns> | ||
[HttpGet] | ||
[HasPermission(Permissions.LeaseEdit)] | ||
[Produces("application/json")] | ||
[ProducesResponseType(typeof(IEnumerable<InsuranceModel>), 200)] | ||
[SwaggerOperation(Tags = new[] { "insurance" })] | ||
[TypeFilter(typeof(NullJsonResultFilter))] | ||
public IActionResult GetInsurance(int leaseId) | ||
{ | ||
_logger.LogInformation( | ||
"Request received by Controller: {Controller}, Action: {ControllerAction}, User: {User}, DateTime: {DateTime}", | ||
nameof(PropertyImprovementController), | ||
nameof(GetInsurance), | ||
User.GetUsername(), | ||
DateTime.Now); | ||
|
||
var insuranceModels = _mapper.Map<IEnumerable<InsuranceModel>>(_leaseService.GetInsuranceByLeaseId(leaseId)); | ||
|
||
return new JsonResult(insuranceModels); | ||
} | ||
#endregion | ||
} | ||
} |
Oops, something went wrong.