-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include full system and resource objects in GET vendorrequest (#380)
* enrich right with actual resource in bff before returning request object to frontend * add method to GET single system * include system in VendorRequest return object * fix tests * lookup system vendor orgn name in register when setting system in vendorrequest response * remove frontend mapping of system and resources for vendorrequest * move mapping of system vendor name and rights for systemuser to backend * use data from backend * add function to get list of resources from list of rights. Refactor DTOs to return resources in separate property * comment improvements * test-data * await async calls * show error message if request.system is null * cleanup system DTO + move filtering of visible systems to bff * WIP remove enrichment from bff * refactor after change in altinn-authentication * remove register client (supplier name is set in altinn-authentication instead) * add registerClient + vendor org name lookup back * fix request path * add null checks * rename entity * rename method name + add cancellationToken to registry request * fix path after change in backend * test api change * fix route again * test hardcode action * remove hardcode
- Loading branch information
Showing
35 changed files
with
370 additions
and
235 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
4 changes: 3 additions & 1 deletion
4
...Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/IResourceRegistryClient.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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
using Altinn.Authentication.UI.Core.Common.Rights; | ||
|
||
namespace Altinn.Authentication.UI.Core.SystemRegister; | ||
|
||
public interface IResourceRegistryClient | ||
{ | ||
Task<ServiceResource?> GetResource(string resourceId, CancellationToken cancellationToken = default); | ||
Task<List<ServiceResource>> GetResources(List<Right> rights, CancellationToken cancellationToken = default); | ||
} |
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
78 changes: 0 additions & 78 deletions
78
....Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/RegisterSystemResponse.cs
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
...inn.Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/RegisteredSystemDTO.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,44 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using Altinn.Authentication.UI.Core.Common.Rights; | ||
|
||
namespace Altinn.Authentication.UI.Core.SystemRegister | ||
{ | ||
/// <summary> | ||
/// Model for the response of a registered system | ||
/// A Registered System is a product supplied by a System Vendor, | ||
/// it may need Rights to use or acccess Resources at a Service Provider. | ||
/// </summary> | ||
[ExcludeFromCodeCoverage] | ||
public record class RegisteredSystemDTO | ||
{ | ||
/// <summary> | ||
/// A unique External Id for this System, in human-readable string format. | ||
/// </summary> | ||
public required string SystemId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// Organization number of the system Vendor that offers the product (system) | ||
/// </summary> | ||
public required string SystemVendorOrgNumber { get; set; } | ||
|
||
/// <summary> | ||
/// Organization number of the system Vendor that offers the product (system) | ||
/// </summary> | ||
public string SystemVendorOrgName { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// A short name of the product, used when displaying to the user | ||
/// </summary> | ||
public required IDictionary<string, string> Name { get; set; } | ||
|
||
/// <summary> | ||
/// A short description of the product, used when displaying to the user | ||
/// </summary> | ||
public required IDictionary<string, string> Description { get; set; } | ||
|
||
/// <summary> | ||
/// The array of Rights versus System Provider's Resources needed to use this Registered System | ||
/// </summary> | ||
public List<Right> Rights { get; set; } = []; | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
...rc/Altinn.Authentication.UI/Altinn.Authentication.UI.Core/SystemRegister/RightFrontEnd.cs
This file was deleted.
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
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
Oops, something went wrong.