Skip to content

Commit 55ff988

Browse files
authored
Merge pull request #1711 from bcgov/test
Master -> Test - IS30 UAT Release
2 parents 38b2c24 + 09189fd commit 55ff988

File tree

331 files changed

+66539
-8458
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+66539
-8458
lines changed

backend/api/Areas/Admin/Controllers/AccessRequestController.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
using MapsterMapper;
22
using Microsoft.AspNetCore.Mvc;
3+
using Pims.Api.Models;
4+
using Pims.Api.Models.Concepts;
35
using Pims.Api.Policies;
46
using Pims.Dal;
57
using Pims.Dal.Security;
68
using Swashbuckle.AspNetCore.Annotations;
79
using EModel = Pims.Dal.Entities.Models;
810
using Entity = Pims.Dal.Entities;
9-
using Pims.Api.Models;
10-
using Pims.Api.Models.Concepts;
1111

1212
namespace Pims.Api.Areas.Admin.Controllers
1313
{
@@ -28,6 +28,7 @@ public class AccessRequestController : Controller
2828
#endregion
2929

3030
#region Constructors
31+
3132
/// <summary>
3233
/// Creates a new instance of an AccessRequestController object, initializes with specified parameters.
3334
/// </summary>
@@ -48,9 +49,6 @@ public AccessRequestController(IPimsRepository pimsService, IMapper mapper)
4849
/// <param name="page"></param>
4950
/// <param name="quantity"></param>
5051
/// <param name="searchText"></param>
51-
/// <param name="role"></param>
52-
/// <param name="organization"></param>
53-
/// <param name="status"></param>
5452
/// <param name="sort"></param>
5553
/// <returns></returns>
5654
[HttpGet]
@@ -87,6 +85,7 @@ public IActionResult GetPage(int page = 1, int quantity = 10, string searchText
8785
/// <summary>
8886
/// Get the most recent access request for the current user.
8987
/// </summary>
88+
/// <param name="id"></param>
9089
/// <returns></returns>
9190
[HttpGet("{id}")]
9291
[Produces("application/json")]
@@ -105,6 +104,7 @@ public IActionResult GetAccessRequest(long id)
105104
/// </summary>
106105
/// <param name="id"></param>
107106
/// <param name="model"></param>
107+
/// <returns></returns>
108108
[HttpDelete("{id}")]
109109
[Produces("application/json")]
110110
[ProducesResponseType(typeof(AccessRequestModel), 200)]
@@ -120,4 +120,3 @@ public IActionResult Delete(long id, [FromBody] AccessRequestModel model)
120120

121121
}
122122
}
123-

backend/api/Areas/Admin/Controllers/ClaimController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
using System;
12
using MapsterMapper;
23
using Microsoft.AspNetCore.Mvc;
34
using Pims.Api.Policies;
45
using Pims.Dal;
56
using Pims.Dal.Entities;
67
using Pims.Dal.Security;
78
using Swashbuckle.AspNetCore.Annotations;
8-
using System;
99
using Entity = Pims.Dal.Entities;
1010
using Model = Pims.Api.Models.Concepts;
1111

backend/api/Areas/Admin/Controllers/RoleController.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,6 @@ public IActionResult GetRole(Guid key)
9292
return new JsonResult(role);
9393
}
9494

95-
/// <summary>
96-
/// GET - Returns a role for the specified 'name' from the datasource.
97-
/// </summary>
98-
/// <param name="name">The unique 'name' for the role to return.</param>
99-
/// <returns>The role requested.</returns>
100-
[HttpGet("name/{name}")]
101-
[Produces("application/json")]
102-
[ProducesResponseType(typeof(Model.RoleModel), 200)]
103-
[ProducesResponseType(typeof(Api.Models.ErrorResponseModel), 400)]
104-
[SwaggerOperation(Tags = new[] { "admin-role" })]
105-
public IActionResult GetRoleByName(string name)
106-
{
107-
var entity = _pimsService.Role.GetByName(name);
108-
var role = _mapper.Map<Model.RoleModel>(entity);
109-
return new JsonResult(role);
110-
}
111-
11295
/// <summary>
11396
/// POST - Add a new role to the datasource.
11497
/// </summary>

backend/api/Areas/Keycloak/Controllers/RoleController.cs

Lines changed: 0 additions & 132 deletions
This file was deleted.

backend/api/Areas/Keycloak/Controllers/UserController.cs

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -43,71 +43,6 @@ public UserController(IMapper mapper, IPimsKeycloakService keycloakService)
4343
#endregion
4444

4545
#region Endpoints
46-
/// <summary>
47-
/// Sync the user for the specified 'key' from keycloak with PIMS.
48-
/// If the user does not exist in keycloak it will return a 400-BadRequest.
49-
/// If the user does not exist in PIMS it will add it.
50-
/// Also links the user to the appropriate groups it is a member of within keycloak.!--
51-
/// If the group does not exist in PIMS it will add it.
52-
/// </summary>
53-
/// <param name="key"></param>
54-
/// <exception type="KeyNotFoundException">The user does not exist in keycloak.</exception>
55-
/// <returns></returns>
56-
[HttpPost("sync/{key}")]
57-
[Produces("application/json")]
58-
[ProducesResponseType(typeof(KModel.UserModel), 200)]
59-
[ProducesResponseType(typeof(Api.Models.ErrorResponseModel), 400)]
60-
[SwaggerOperation(Tags = new[] { "keycloak-user" })]
61-
[HasPermission(Permissions.AdminUsers)]
62-
public async Task<IActionResult> SyncUserAsync(Guid key)
63-
{
64-
var user = await _keycloakService.SyncUserAsync(key);
65-
var result = _mapper.Map<KModel.UserModel>(user);
66-
67-
return new JsonResult(result);
68-
}
69-
70-
/// <summary>
71-
/// Fetch an array of users from keycloak.
72-
/// This endpoint supports paging.
73-
/// </summary>
74-
/// <param name="page"></param>
75-
/// <param name="quantity"></param>
76-
/// <param name="search"></param>
77-
/// <returns></returns>
78-
[HttpGet]
79-
[Produces("application/json")]
80-
[ProducesResponseType(typeof(IEnumerable<KModel.UserModel>), 200)]
81-
[ProducesResponseType(typeof(Api.Models.ErrorResponseModel), 400)]
82-
[SwaggerOperation(Tags = new[] { "keycloak-user" })]
83-
[HasPermission(Permissions.AdminUsers)]
84-
public async Task<IActionResult> GetUsersAsync(int page = 1, int quantity = 10, string search = null)
85-
{
86-
var users = await _keycloakService.GetUsersAsync(page, quantity, search);
87-
var result = _mapper.Map<KModel.UserModel[]>(users);
88-
89-
return new JsonResult(result);
90-
}
91-
92-
/// <summary>
93-
/// Fetch the user for the specified 'key'.
94-
/// If the user does not exist in keycloak or PIMS return a 400-BadRequest.
95-
/// </summary>
96-
/// <exception type="KeyNotFoundException">The user does not exist in keycloak.</exception>
97-
/// <returns></returns>
98-
[HttpGet("{key:guid}")]
99-
[Produces("application/json")]
100-
[ProducesResponseType(typeof(KModel.UserModel), 200)]
101-
[ProducesResponseType(typeof(Api.Models.ErrorResponseModel), 400)]
102-
[SwaggerOperation(Tags = new[] { "keycloak-user" })]
103-
[HasPermission(Permissions.AdminUsers)]
104-
public async Task<IActionResult> GetUserAsync(Guid key)
105-
{
106-
var user = await _keycloakService.GetUserAsync(key);
107-
var result = _mapper.Map<KModel.UserModel>(user);
108-
109-
return new JsonResult(result);
110-
}
11146

11247
/// <summary>
11348
/// Update the user for the specified 'key'.

backend/api/Areas/Keycloak/Mapping/User/UserMap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
using System.Linq;
12
using Mapster;
23
using Pims.Dal.Entities;
34
using Entity = Pims.Dal.Entities;
45
using KModel = Pims.Keycloak.Models;
56
using Model = Pims.Api.Areas.Keycloak.Models.User;
6-
using System.Linq;
77

88
namespace Pims.Api.Areas.Keycloak.Mapping.User
99
{

backend/api/Areas/Property/Controllers/PropertyController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ public IActionResult GetPropertyAssociationsWithPid(string pid)
107107
public IActionResult GetConceptPropertyWithPid(string pid)
108108
{
109109
var property = _pimsService.PropertyService.GetByPid(pid);
110-
111110
return new JsonResult(_mapper.Map<Pims.Api.Models.Concepts.PropertyModel>(property));
112111
}
113112

backend/api/Areas/Property/Mapping/Property/PropertyMap.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ public void Register(TypeAdapterConfig config)
3131
.Map(dest => dest.Description, src => src.Description)
3232
.Map(dest => dest.IsSensitive, src => src.IsSensitive)
3333
.Map(dest => dest.IsProvincialPublicHwy, src => src.IsProvincialPublicHwy)
34+
.Map(dest => dest.PphStatusUpdateUserid, src => src.PphStatusUpdateUserid)
35+
.Map(dest => dest.PphStatusUpdateTimestamp, src => src.PphStatusUpdateTimestamp)
36+
.Map(dest => dest.PphStatusUpdateUserGuid, src => src.PphStatusUpdateUserGuid)
37+
.Map(dest => dest.IsRwyBeltDomPatent, src => src.IsRwyBeltDomPatent)
38+
.Map(dest => dest.PphStatusTypeCode, src => src.PphStatusTypeCode)
3439
.Map(dest => dest.Notes, src => src.Notes)
3540

3641
.Map(dest => dest.LandArea, src => src.LandArea)

backend/api/Areas/Property/Models/Property/PropertyModel.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,31 @@ public class PropertyModel : BaseModel
8686
/// get/set - Whether the property is a provincial highway.
8787
/// </summary>
8888
public bool? IsProvincialPublicHwy { get; set; }
89+
90+
/// <summary>
91+
/// get/set - Updated by user id.
92+
/// </summary>
93+
public string PphStatusUpdateUserid { get; set; }
94+
95+
/// <summary>
96+
/// get/set - Updated on date time stamp.
97+
/// </summary>
98+
public DateTime? PphStatusUpdateTimestamp { get; set; }
99+
100+
/// <summary>
101+
/// get/set - Updated by user guid.
102+
/// </summary>
103+
public Guid? PphStatusUpdateUserGuid { get; set; }
104+
105+
/// <summary>
106+
/// get/set - Whether the property is a Rwy Belt Dom Patent.
107+
/// </summary>
108+
public bool? IsRwyBeltDomPatent { get; set; }
109+
110+
/// <summary>
111+
/// get/set - Provincial Public Hwy Status.
112+
/// </summary>
113+
public string PphStatusTypeCode { get; set; }
89114
#endregion
90115

91116
#region Address

backend/api/Controllers/LookupController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public IActionResult GetAll()
112112
var propertyAdjacentLandTypes = _mapper.Map<Model.LookupModel[]>(_pimsService.Lookup.GetPropertyAdjacentLandTypes());
113113
var volumeUnitTypes = _mapper.Map<Model.LookupModel[]>(_pimsService.Lookup.GetPropertyVolumeUnitTypes());
114114
var propertyVolumetricTypes = _mapper.Map<Model.LookupModel[]>(_pimsService.Lookup.GetPropertyVolumetricTypes());
115+
var pphStatusType = _mapper.Map<Model.LookupModel[]>(_pimsService.Lookup.GetPPHStatusType());
115116

116117
var codes = new List<object>();
117118
codes.AddRange(areaUnitTypes);
@@ -149,7 +150,8 @@ public IActionResult GetAll()
149150
codes.AddRange(propertyAdjacentLandTypes);
150151
codes.AddRange(volumeUnitTypes);
151152
codes.AddRange(propertyVolumetricTypes);
152-
153+
codes.AddRange(pphStatusType);
154+
153155
return new JsonResult(codes);
154156
}
155157
#endregion

0 commit comments

Comments
 (0)