From 03d41a635f9e7263c8ac2e61d8fd729e94a39e2f Mon Sep 17 00:00:00 2001 From: Binon Date: Fri, 6 Jun 2025 23:39:08 +0100 Subject: [PATCH 01/30] Moved all nuget packages to central package management --- .../LearningHub.Nhs.AdminUI.csproj | 1262 ++++++++--------- Directory.Build.props | 2 +- Directory.Packages.props | 93 ++ ...rningHub.Nhs.WebUI.AutomatedUiTests.csproj | 32 +- .../LearningHub.Nhs.WebUI.csproj | 496 ++++--- .../Services/AzureMediaService.cs | 2 +- .../LearningHub.Nhs.OpenApi.Models.csproj | 39 +- ....Nhs.OpenApi.Repositories.Interface.csproj | 46 +- ...earningHub.Nhs.OpenApi.Repositories.csproj | 60 +- ...gHub.Nhs.OpenApi.Services.Interface.csproj | 46 +- .../LearningHub.Nhs.OpenApi.Services.csproj | 76 +- .../LearningHub.Nhs.OpenApi.Tests.csproj | 59 +- .../LearningHub.NHS.OpenAPI.csproj | 79 +- ...ub.Nhs.ReportApi.Services.Interface.csproj | 17 +- ...ub.Nhs.ReportApi.Services.UnitTests.csproj | 28 +- .../LearningHub.Nhs.ReportApi.Services.csproj | 26 +- .../LearningHub.Nhs.ReportApi.Shared.csproj | 12 +- .../LearningHub.Nhs.ReportApi.csproj | 39 +- .../LearningHub.Nhs.Api.csproj | 60 +- .../LearningHub.Nhs.Api.Shared.csproj | 23 +- .../LearningHub.Nhs.Api.UnitTests.csproj | 36 +- ...earningHub.Nhs.Repository.Interface.csproj | 34 +- .../LearningHub.Nhs.Repository.csproj | 28 +- .../LearningHub.Nhs.Services.Interface.csproj | 29 +- .../LearningHub.Nhs.Services.UnitTests.csproj | 45 +- .../LearningHub.Nhs.Services.csproj | 44 +- ...earningHub.Nhs.Migration.ConsoleApp.csproj | 33 +- ...LearningHub.Nhs.Migration.Interface.csproj | 24 +- .../LearningHub.Nhs.Migration.Models.csproj | 27 +- ...ub.Nhs.Migration.Staging.Repository.csproj | 25 +- ...LearningHub.Nhs.Migration.UnitTests.csproj | 34 +- .../LearningHub.Nhs.Migration.csproj | 52 +- nuget.config | 18 + 33 files changed, 1431 insertions(+), 1495 deletions(-) create mode 100644 Directory.Packages.props create mode 100644 nuget.config diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index eba6b6ffa..ce9830312 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -1,645 +1,631 @@ - - + net8.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 31abd8b9-4223-4ff3-896b-a46530c9e15c /subscriptions/57c55d5f-78c1-4373-a021-ff8357548f51/resourceGroups/LearningHubNhsUk-AdminUI-Prod-RG/providers/microsoft.insights/components/LearningHubNhsUk-AdminUI-Prod true true - x64 + x64 - - - - - - - - - - - - - - - - - - - - - - - <_ContentIncludedByDefault Remove="bundleconfig.json" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + <_ContentIncludedByDefault Remove="bundleconfig.json" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + + + + + + \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 709a8ce13..c3a7f4e28 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ $(SolutionDir)StyleCop.ruleset - + \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 000000000..8f1d8febf --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,93 @@ + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj index d6bf3cd0d..e12ccd3f4 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj @@ -1,37 +1,31 @@ - - + net8.0 enable enable - false - True - - - - - - - - - - - + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - + \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj index dc2cf661d..24d3c72f8 100644 --- a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj +++ b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj @@ -1,256 +1,242 @@  - - - net8.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 - InProcess - a2ecb5d2-cf13-4551-9cb6-3d86dfbcf8ef - true - true - x64 - true - - - - Project - http://localhost:5001 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - Always - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - + + net8.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 + InProcess + a2ecb5d2-cf13-4551-9cb6-3d86dfbcf8ef + true + true + x64 + true + + + Project + http://localhost:5001 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/Services/AzureMediaService.cs b/LearningHub.Nhs.WebUI/Services/AzureMediaService.cs index 6068bc067..f2877b9eb 100644 --- a/LearningHub.Nhs.WebUI/Services/AzureMediaService.cs +++ b/LearningHub.Nhs.WebUI/Services/AzureMediaService.cs @@ -71,7 +71,7 @@ public async Task CreateMediaInputAsset(IFormFile file) string filename = Regex.Replace(file.FileName, "[^a-zA-Z0-9.]", string.Empty); var destContainer = new BlobContainerClient(new Uri(uploadSasUrl)); - var destBlob = destContainer.GetBlockBlobClient(filename.IsNullOrEmpty() ? "file.txt" : filename); + var destBlob = destContainer.GetBlockBlobClient(string.IsNullOrEmpty(filename) ? "file.txt" : filename); await destBlob.UploadAsync(file.OpenReadStream()); return asset.Name; diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj index f34790d51..baf3dee90 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj @@ -1,23 +1,18 @@ - - - net8.0 - true - enable - x64 - - - - - - - - - - - - - - - - + + net8.0 + true + enable + x64 + + + + + + + + + + + + \ No newline at end of file diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj index 3444f18a2..1617cfa0d 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj @@ -1,27 +1,21 @@ - - - net8.0 - LearningHub.Nhs.OpenApi.Repositories.Interface - enable - true - x64 - - - - - - - - - - - - - - - - - - - + + net8.0 + LearningHub.Nhs.OpenApi.Repositories.Interface + enable + true + x64 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj index b26c815cd..effe5591f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj @@ -1,33 +1,27 @@ - - - - net8.0 - LearningHub.Nhs.OpenApi.Repositories - enable - true - x64 - - - - - - - - - - - - - - - - - - - - - - - - - + + + net8.0 + LearningHub.Nhs.OpenApi.Repositories + enable + true + x64 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj index 20b3a1c06..274460624 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj @@ -1,27 +1,21 @@ - - - net8.0 - enable - true - x64 - - - - - - - - - - - - - - - - - - - - + + net8.0 + enable + true + x64 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index f84d5121c..465bda0cd 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -1,41 +1,35 @@ - - - - net8.0 - LearningHub.Nhs.OpenApi.Services - enable - true - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + net8.0 + LearningHub.Nhs.OpenApi.Services + enable + true + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj index 87712e074..8974e0fdb 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj @@ -1,31 +1,28 @@ - - - - net8.0 - false - enable - x64 - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - + + + net8.0 + false + enable + x64 + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + \ No newline at end of file diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj index 83639e186..0871850e4 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj @@ -1,44 +1,37 @@ - - - enable - net8.0 - true - x64 - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - + + enable + net8.0 + true + x64 + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj index 0a697a51f..b8c9379fa 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj @@ -1,30 +1,23 @@ - - + net8.0 enable enable - - - - - - + + + - - - - + \ No newline at end of file diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj index 50e3d7536..114d8ae76 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj @@ -1,46 +1,38 @@ - - + net8.0 enable enable - false - - - - - - - - - - + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - + \ No newline at end of file diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj index 55c8a1be4..fe3bf575b 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj @@ -1,37 +1,29 @@ - - + net8.0 enable enable - - - - - - - - - - - + + + + + + + - - - - + \ No newline at end of file diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj index 2f5518784..b32e219f3 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj @@ -1,5 +1,4 @@ - - + net8.0 enable @@ -7,21 +6,16 @@ $(NoWarn),1573,1591,1712 True - - - - + - - - + \ No newline at end of file diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj index 583caa9f2..17b31c21d 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj @@ -1,42 +1,31 @@ - - + net8.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 enable enable False - - - - - - - - - - - - - - - - + + + + + + + - PreserveNewest @@ -44,14 +33,12 @@ PreserveNewest - PreserveNewest - - - + + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index bb0c6c6cc..834f8d32c 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -3,49 +3,43 @@ net8.0 1.0.0.0 1.0.0.0 - 1.0.0 + 1.0.0 InProcess 234b55ad-984b-47ae-9d7a-71e372e6ded7 true - x64 + x64 - LearningHub.Nhs.Api.xml - - Always - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + @@ -55,10 +49,12 @@ - - - - + + + + + + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj index 74d2ccc77..1cfafdb8e 100644 --- a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj +++ b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj @@ -1,19 +1,16 @@ - - + net8.0 true - x64 + x64 - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj index 9663e4ee7..b024beaf5 100644 --- a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj @@ -1,34 +1,30 @@ - - + net8.0 true false - x64 + x64 - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj index d41ba9e68..91c49b25f 100644 --- a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj @@ -1,27 +1,23 @@ - - + net8.0 true - x64 + x64 - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - + - - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj index 904bda4c8..836a83129 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj @@ -1,25 +1,21 @@ - - + net8.0 true - x64 + x64 - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj index b259b3a7e..636f10a2e 100644 --- a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj @@ -1,31 +1,26 @@ - - + net8.0 true - x64 + x64 - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj index f78df0084..08a04e008 100644 --- a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj @@ -1,35 +1,32 @@ - - + net8.0 true false - x64 + x64 - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all runtime; build; native; contentfiles; analyzers - @@ -37,11 +34,9 @@ - PreserveNewest - - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj index e99e5300a..38c383d6c 100644 --- a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj +++ b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj @@ -1,31 +1,28 @@ - - + net8.0 true - x64 + x64 - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + - @@ -34,5 +31,4 @@ - - + \ No newline at end of file diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj index 697d1db2f..0a2e1e509 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj @@ -1,17 +1,14 @@ - - + Exe net8.0 7.3 true - x64 + x64 - - PreserveNewest @@ -19,24 +16,21 @@ PreserveNewest - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - Always @@ -63,5 +57,4 @@ Always - - + \ No newline at end of file diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj index 89ca1344e..75f4e5e58 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj @@ -1,23 +1,19 @@ - - + net8.0 true - x64 + x64 - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - + \ No newline at end of file diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj index 4ab608bac..9801da32e 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj @@ -1,21 +1,18 @@ - - + net8.0 true - x64 + x64 - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - + \ No newline at end of file diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj index 7dd7febb7..e21f4c7a4 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj @@ -1,28 +1,23 @@ - - + net8.0 true - x64 + x64 - - - - - - + + + + + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive + all + runtime; build; native; contentfiles; analyzers; buildtransitive - - + \ No newline at end of file diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj index 5b83ec893..48f23a40b 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj @@ -1,35 +1,31 @@ - - + net8.0 true false - x64 + x64 - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + - - + \ No newline at end of file diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj index bf0235325..9082047ec 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj @@ -1,30 +1,26 @@ - - - - net8.0 - true - x64 - - + + + net8.0 + true + x64 + - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - - - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/nuget.config b/nuget.config new file mode 100644 index 000000000..4b5a05544 --- /dev/null +++ b/nuget.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file From beda631c890b5a4573c7995c1ff1796c3cfe558a Mon Sep 17 00:00:00 2001 From: binon Date: Mon, 9 Jun 2025 09:08:35 +0100 Subject: [PATCH 02/30] Update continuous-integration-workflow.yml --- .github/workflows/continuous-integration-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index f1609bb44..24c2d6891 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -76,7 +76,9 @@ jobs: dotnet-version: 8.0.x - name: Add Azure artifact - run: dotnet nuget add source 'https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json' --name 'LearningHubFeed' --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text + run: | + dotnet nuget remove source LearningHubFeed || true + dotnet nuget add source 'https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json' --name 'LearningHubFeed' --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text - name: Use Node 20 with Yarn uses: actions/setup-node@v4 From f15174a47d89d1023bf78b73e8f8ed2d9a6a6c2b Mon Sep 17 00:00:00 2001 From: Binon Date: Fri, 13 Jun 2025 16:24:38 +0100 Subject: [PATCH 03/30] updatiing the nuget.config file --- LearningHub.Nhs.WebUI.sln | 2 ++ LearningHub.Nhs.WebUI/web.config | 41 +++++++++++++++------------ WebAPI/LearningHub.Nhs.API/web.config | 12 +++++--- nuget.config | 2 ++ 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/LearningHub.Nhs.WebUI.sln b/LearningHub.Nhs.WebUI.sln index 5aea6885f..433e58877 100644 --- a/LearningHub.Nhs.WebUI.sln +++ b/LearningHub.Nhs.WebUI.sln @@ -8,6 +8,8 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B5D48B6A-D4A7-494E-89C0-64428232D242}" ProjectSection(SolutionItems) = preProject Directory.Build.props = Directory.Build.props + Directory.Packages.props = Directory.Packages.props + nuget.config = nuget.config StyleCop.ruleset = StyleCop.ruleset EndProjectSection EndProject diff --git a/LearningHub.Nhs.WebUI/web.config b/LearningHub.Nhs.WebUI/web.config index 837247997..541f29920 100644 --- a/LearningHub.Nhs.WebUI/web.config +++ b/LearningHub.Nhs.WebUI/web.config @@ -1,21 +1,26 @@  - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.API/web.config b/WebAPI/LearningHub.Nhs.API/web.config index 62efcf17d..6483ee683 100644 --- a/WebAPI/LearningHub.Nhs.API/web.config +++ b/WebAPI/LearningHub.Nhs.API/web.config @@ -11,10 +11,14 @@ - - - - + + + + + + + + diff --git a/nuget.config b/nuget.config index 4b5a05544..e612356f4 100644 --- a/nuget.config +++ b/nuget.config @@ -13,6 +13,8 @@ + + \ No newline at end of file From 55acd9f689385a1c99b548bd9a10d94507ba1bc8 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Mon, 16 Jun 2025 15:59:11 +0100 Subject: [PATCH 04/30] TD-5665-Adding resources to the community catalogue is suspended --- .../Interfaces/IUserGroupService.cs | 6 ++++++ .../Services/NavigationPermissionService.cs | 13 +++++++++---- .../Services/UserGroupService.cs | 17 ++++++++++++++++- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs b/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs index a333e0c89..c91c2e0b2 100644 --- a/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs @@ -22,6 +22,12 @@ public interface IUserGroupService /// The . Task> GetRoleUserGroupDetailForUserAsync(int userId); + /// + /// The GetRoleUserGroupDetailAsync. + /// + /// The . + Task UserHasCatalogueContributionPermission(); + /// /// Check if user has given permission. /// diff --git a/LearningHub.Nhs.WebUI/Services/NavigationPermissionService.cs b/LearningHub.Nhs.WebUI/Services/NavigationPermissionService.cs index 95e74022e..e381b0403 100644 --- a/LearningHub.Nhs.WebUI/Services/NavigationPermissionService.cs +++ b/LearningHub.Nhs.WebUI/Services/NavigationPermissionService.cs @@ -11,14 +11,19 @@ public class NavigationPermissionService : INavigationPermissionService { private readonly IResourceService resourceService; + private readonly IUserGroupService userGroupService; /// /// Initializes a new instance of the class. /// /// Resource service. - public NavigationPermissionService(IResourceService resourceService) + /// UserGroup service. + public NavigationPermissionService( + IResourceService resourceService, + IUserGroupService userGroupService) { this.resourceService = resourceService; + this.userGroupService = userGroupService; } /// @@ -52,7 +57,7 @@ public async Task GetNavigationModelAsync(IPrincipal user, bool } else if (user.IsInRole("BlueUser")) { - return this.AuthenticatedBlueUser(controllerName); + return await this.AuthenticatedBlueUser(controllerName); } else { @@ -114,11 +119,11 @@ private NavigationModel AuthenticatedAdministrator(string controllerName) /// /// The controller name. /// The . - private NavigationModel AuthenticatedBlueUser(string controllerName) + private async Task AuthenticatedBlueUser(string controllerName) { return new NavigationModel() { - ShowMyContributions = true, + ShowMyContributions = await this.userGroupService.UserHasCatalogueContributionPermission(), ShowMyLearning = true, ShowMyBookmarks = true, ShowSearch = controllerName != "search" && controllerName != string.Empty, diff --git a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs index 6790a3143..be77f6531 100644 --- a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs @@ -46,7 +46,10 @@ public UserGroupService( public async Task> GetRoleUserGroupDetailAsync() { var cacheKey = $"{this.contextAccessor.HttpContext.User.Identity.GetCurrentUserId()}:AllRolesWithPermissions"; - return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); + cacheKey = null; + ////return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); + + return await this.FetchRoleUserGroupDetailAsync(); } /// @@ -56,6 +59,18 @@ public async Task> GetRoleUserGroupDetailForUserAsy return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailForUserAsync(userId)); } + /// + public async Task UserHasCatalogueContributionPermission() + { + var userRoleGroups = await this.GetRoleUserGroupDetailAsync(); + if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleName == "Local Admin" || r.RoleName == "Editor")) + { + return true; + } + + return false; + } + /// public async Task UserHasPermissionAsync(string permissionCode) { From 0bd9e91b7a1562101830f238bff12b6e35bfbbd4 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Mon, 16 Jun 2025 16:59:56 +0100 Subject: [PATCH 05/30] Td-5664: Implement a business rule tieing 'Contribute a resource' and a Catalogue permission/group --- .gitignore | 3 +++ AdminUI/LearningHub.Nhs.AdminUI/web.config | 21 --------------------- LearningHub.Nhs.WebUI/web.config | 21 --------------------- WebAPI/LearningHub.Nhs.API/web.config | 21 --------------------- 4 files changed, 3 insertions(+), 63 deletions(-) delete mode 100644 AdminUI/LearningHub.Nhs.AdminUI/web.config delete mode 100644 LearningHub.Nhs.WebUI/web.config delete mode 100644 WebAPI/LearningHub.Nhs.API/web.config diff --git a/.gitignore b/.gitignore index fcd06e014..8cc7d8bbe 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,6 @@ obj /AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj.user /WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj.user /ReportAPI/LearningHub.Nhs.ReportApi/web.config +/AdminUI/LearningHub.Nhs.AdminUI/web.config +/LearningHub.Nhs.WebUI/web.config +/WebAPI/LearningHub.Nhs.API/web.config diff --git a/AdminUI/LearningHub.Nhs.AdminUI/web.config b/AdminUI/LearningHub.Nhs.AdminUI/web.config deleted file mode 100644 index 6bcb74972..000000000 --- a/AdminUI/LearningHub.Nhs.AdminUI/web.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/LearningHub.Nhs.WebUI/web.config b/LearningHub.Nhs.WebUI/web.config deleted file mode 100644 index 837247997..000000000 --- a/LearningHub.Nhs.WebUI/web.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/WebAPI/LearningHub.Nhs.API/web.config b/WebAPI/LearningHub.Nhs.API/web.config deleted file mode 100644 index 62efcf17d..000000000 --- a/WebAPI/LearningHub.Nhs.API/web.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 4ec4010ce9ad18ef671129196990299e7ab24ff3 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Mon, 16 Jun 2025 17:00:18 +0100 Subject: [PATCH 06/30] TD-5664: Implement a business rule tieing 'Contribute a resource' and a Catalogue permission/group --- .../Hierarchy/CatalogueNodeVersionRepository.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs b/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs index 38f77a37f..d12f1b730 100644 --- a/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs +++ b/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs @@ -81,10 +81,10 @@ public async Task> GetPublishedCatalogues() /// The . public IQueryable GetPublishedCataloguesForUserAsync(int userId) { - var communityCatalogue = this.DbContext.CatalogueNodeVersion.AsNoTracking() - .Include(cnv => cnv.NodeVersion.Node) - .Where(cnv => cnv.NodeVersion.VersionStatusEnum == VersionStatusEnum.Published - && cnv.NodeVersion.NodeId == 1 /* Community Catalogue */); + ////var communityCatalogue = this.DbContext.CatalogueNodeVersion.AsNoTracking() + //// .Include(cnv => cnv.NodeVersion.Node) + //// .Where(cnv => cnv.NodeVersion.VersionStatusEnum == VersionStatusEnum.Published + //// && cnv.NodeVersion.NodeId == 1 /* Community Catalogue */); var cataloguesForUser = from cnv in this.DbContext.CatalogueNodeVersion.Include(cnv => cnv.NodeVersion.Node).AsNoTracking() join nv in this.DbContext.NodeVersion.Where(cnv => cnv.VersionStatusEnum == VersionStatusEnum.Published && !cnv.Deleted) // .Include(nv => nv.Node) @@ -99,7 +99,7 @@ join n in this.DbContext.Node.Where(x => !x.Deleted) on nv.Id equals n.CurrentNodeVersionId select cnv; - var returnedCatalogues = communityCatalogue.Union(cataloguesForUser).Distinct() + var returnedCatalogues = cataloguesForUser.Distinct() .OrderBy(cnv => cnv.NodeVersion.NodeId != 1) .ThenBy(cnv => cnv.Name); From 4e100304432fa253bfcb6a96c44fa30da5d56667 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Mon, 16 Jun 2025 17:07:20 +0100 Subject: [PATCH 07/30] Removed commented lines --- .../Hierarchy/CatalogueNodeVersionRepository.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs b/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs index d12f1b730..5ae373e42 100644 --- a/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs +++ b/WebAPI/LearningHub.Nhs.Repository/Hierarchy/CatalogueNodeVersionRepository.cs @@ -81,11 +81,6 @@ public async Task> GetPublishedCatalogues() /// The . public IQueryable GetPublishedCataloguesForUserAsync(int userId) { - ////var communityCatalogue = this.DbContext.CatalogueNodeVersion.AsNoTracking() - //// .Include(cnv => cnv.NodeVersion.Node) - //// .Where(cnv => cnv.NodeVersion.VersionStatusEnum == VersionStatusEnum.Published - //// && cnv.NodeVersion.NodeId == 1 /* Community Catalogue */); - var cataloguesForUser = from cnv in this.DbContext.CatalogueNodeVersion.Include(cnv => cnv.NodeVersion.Node).AsNoTracking() join nv in this.DbContext.NodeVersion.Where(cnv => cnv.VersionStatusEnum == VersionStatusEnum.Published && !cnv.Deleted) // .Include(nv => nv.Node) on cnv.NodeVersionId equals nv.Id From 2b436720b813385475835c8c832e08a79a38a1f8 Mon Sep 17 00:00:00 2001 From: binon Date: Mon, 16 Jun 2025 17:38:27 +0100 Subject: [PATCH 08/30] Update nuget.config --- nuget.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nuget.config b/nuget.config index e612356f4..33abf6d35 100644 --- a/nuget.config +++ b/nuget.config @@ -12,9 +12,9 @@ - - - + + + - \ No newline at end of file + From 7d8e96ee0845a289b44c06783dd9d8bda90f7c53 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Tue, 17 Jun 2025 11:11:17 +0100 Subject: [PATCH 09/30] Removed the commented lines --- LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs | 2 +- LearningHub.Nhs.WebUI/Services/UserGroupService.cs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs b/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs index c91c2e0b2..eadae3363 100644 --- a/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Interfaces/IUserGroupService.cs @@ -23,7 +23,7 @@ public interface IUserGroupService Task> GetRoleUserGroupDetailForUserAsync(int userId); /// - /// The GetRoleUserGroupDetailAsync. + /// The UserHasCatalogueContributionPermission. /// /// The . Task UserHasCatalogueContributionPermission(); diff --git a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs index be77f6531..826aa07a0 100644 --- a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs @@ -45,11 +45,8 @@ public UserGroupService( /// public async Task> GetRoleUserGroupDetailAsync() { - var cacheKey = $"{this.contextAccessor.HttpContext.User.Identity.GetCurrentUserId()}:AllRolesWithPermissions"; - cacheKey = null; - ////return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); - - return await this.FetchRoleUserGroupDetailAsync(); + var cacheKey = $"{this.contextAccessor.HttpContext.User.Identity.GetCurrentUserId()}:AllRolesWithPermissions"; + return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); } /// From 4e1d0657aa04f1176ae77c46f6c3306b32d2f3ae Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Tue, 17 Jun 2025 12:02:01 +0100 Subject: [PATCH 10/30] TD-5663: Post log in dashboard - remove banner promoting contribute a resource --- LearningHub.Nhs.WebUI/Controllers/HomeController.cs | 10 ++++++++-- LearningHub.Nhs.WebUI/Services/UserGroupService.cs | 5 +++-- LearningHub.Nhs.WebUI/Views/Home/Dashboard.cshtml | 10 +++++++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs index 7f40afe15..18e3b82fe 100644 --- a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs @@ -40,6 +40,7 @@ public class HomeController : BaseController private readonly IDashboardService dashboardService; private readonly IContentService contentService; private readonly IFeatureManager featureManager; + private readonly IUserGroupService userGroupService; private readonly Microsoft.Extensions.Configuration.IConfiguration configuration; /// @@ -55,6 +56,7 @@ public class HomeController : BaseController /// Dashboard service. /// Content service. /// featureManager. + /// userGroupService. /// config. public HomeController( IHttpClientFactory httpClientFactory, @@ -67,6 +69,7 @@ public HomeController( IDashboardService dashboardService, IContentService contentService, IFeatureManager featureManager, + IUserGroupService userGroupService, Microsoft.Extensions.Configuration.IConfiguration configuration) : base(hostingEnvironment, httpClientFactory, logger, settings.Value) { @@ -76,6 +79,7 @@ public HomeController( this.dashboardService = dashboardService; this.contentService = contentService; this.featureManager = featureManager; + this.userGroupService = userGroupService; this.configuration = configuration; } @@ -212,6 +216,7 @@ public async Task Index(string myLearningDashboard = "my-in-progr var learningTask = this.dashboardService.GetMyAccessLearningsAsync(myLearningDashboard, 1); var resourcesTask = this.dashboardService.GetResourcesAsync(resourceDashboard, 1); var cataloguesTask = this.dashboardService.GetCataloguesAsync(catalogueDashboard, 1); + var userGroupsTask = this.userGroupService.UserHasCatalogueContributionPermission(); var enrolledCoursesTask = Task.FromResult(new List()); var enableMoodle = Task.Run(() => this.featureManager.IsEnabledAsync(FeatureFlags.EnableMoodle)).Result; @@ -222,7 +227,7 @@ public async Task Index(string myLearningDashboard = "my-in-progr enrolledCoursesTask = this.dashboardService.GetEnrolledCoursesFromMoodleAsync(this.CurrentMoodleUserId, 1); } - await Task.WhenAll(learningTask, resourcesTask, cataloguesTask); + await Task.WhenAll(learningTask, resourcesTask, cataloguesTask, userGroupsTask); var model = new DashboardViewModel() { @@ -231,7 +236,8 @@ public async Task Index(string myLearningDashboard = "my-in-progr Catalogues = await cataloguesTask, EnrolledCourses = await enrolledCoursesTask, }; - + var userHasContributePermission = await userGroupsTask; + this.ViewBag.userHasContributePermission = userHasContributePermission; if (!string.IsNullOrEmpty(this.Request.Query["preview"]) && Convert.ToBoolean(this.Request.Query["preview"])) { return this.View("LandingPage", await this.GetLandingPageContent(Convert.ToBoolean(this.Request.Query["preview"]))); diff --git a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs index 826aa07a0..6a4f62966 100644 --- a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Threading.Tasks; using LearningHub.Nhs.Caching; + using LearningHub.Nhs.Models.Enums; using LearningHub.Nhs.Models.Extensions; using LearningHub.Nhs.Models.User; using LearningHub.Nhs.WebUI.Interfaces; @@ -45,7 +46,7 @@ public UserGroupService( /// public async Task> GetRoleUserGroupDetailAsync() { - var cacheKey = $"{this.contextAccessor.HttpContext.User.Identity.GetCurrentUserId()}:AllRolesWithPermissions"; + var cacheKey = $"{this.contextAccessor.HttpContext.User.Identity.GetCurrentUserId()}:AllRolesWithPermissions"; return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); } @@ -60,7 +61,7 @@ public async Task> GetRoleUserGroupDetailForUserAsy public async Task UserHasCatalogueContributionPermission() { var userRoleGroups = await this.GetRoleUserGroupDetailAsync(); - if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleName == "Local Admin" || r.RoleName == "Editor")) + if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleEnum == RoleEnum.LocalAdmin || r.RoleEnum == RoleEnum.Editor)) { return true; } diff --git a/LearningHub.Nhs.WebUI/Views/Home/Dashboard.cshtml b/LearningHub.Nhs.WebUI/Views/Home/Dashboard.cshtml index 4a7b55c08..e8481a4c7 100644 --- a/LearningHub.Nhs.WebUI/Views/Home/Dashboard.cshtml +++ b/LearningHub.Nhs.WebUI/Views/Home/Dashboard.cshtml @@ -5,7 +5,15 @@ @{ ViewData["Title"] = "Learning Hub - Home"; - var isReadOnly = User.IsInRole("ReadOnly") || User.IsInRole("BasicUser"); + var isReadOnly = false; + if (User.IsInRole("ReadOnly") || User.IsInRole("BasicUser")) + { + isReadOnly = true; + } + else if (User.IsInRole("BlueUser") && !this.ViewBag.userHasContributePermission) + { + isReadOnly = true; + } } @section styles { From b3e9c37ead3d618df942cb4eaa419705c89c2440 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:23:36 +0000 Subject: [PATCH 11/30] Bump AngleSharp and 49 others Bumps AngleSharp from 0.16.1 to 1.3.0 Bumps AspNetCore.Authentication.ApiKey from 8.0.1 to 9.0.0 Bumps AutoMapper to 14.0.0 Bumps AutoMapper.Extensions.Microsoft.DependencyInjection to 12.0.1 Bumps Azure.Messaging.ServiceBus from 7.18.3 to 7.20.1 Bumps Azure.Storage.Blobs from 12.23.0 to 12.24.1 Bumps Azure.Storage.Files.Shares from 12.8.0 to 12.11.0 Bumps Azure.Storage.Queues from 12.11.0 to 12.22.0 Bumps coverlet.collector from 1.3.0 to 6.0.4 Bumps EntityFrameworkCore.Testing.Moq from 5.0.0 to 9.0.1 Bumps FluentValidation to 12.0.0 Bumps FluentValidation.AspNetCore to 11.3.1 Bumps HtmlAgilityPack from 1.11.72 to 1.12.1 Bumps HtmlSanitizer from 6.0.453 to 9.0.886 Bumps Microsoft.ApplicationInsights.AspNetCore from 2.21.0 to 2.23.0 Bumps Microsoft.ApplicationInsights.EventCounterCollector from 2.21.0 to 2.23.0 Bumps Microsoft.ApplicationInsights.NLogTarget from 2.22.0 to 2.23.0 Bumps Microsoft.AspNetCore.Authentication.JwtBearer from 6.0.36 to 8.0.17 Bumps Microsoft.AspNetCore.Authentication.OpenIdConnect from 6.0.36 to 8.0.17 Bumps Microsoft.AspNetCore.Mvc.NewtonsoftJson from 6.0.36 to 8.0.17 Bumps Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 6.0.36 to 7.0.0 Bumps Microsoft.AspNetCore.Mvc.Testing from 3.1.13 to 7.0.0 Bumps Microsoft.EntityFrameworkCore to 9.0.0, 9.0.6 Bumps Microsoft.EntityFrameworkCore.Relational to 9.0.0, 9.0.6 Bumps Microsoft.EntityFrameworkCore.SqlServer to 9.0.6 Bumps Microsoft.Extensions.Configuration.Abstractions to 9.0.6 Bumps Microsoft.Extensions.Configuration.Json from 9.0.1 to 9.0.6 Bumps Microsoft.Extensions.DependencyInjection.Abstractions to 9.0.6 Bumps Microsoft.Extensions.Logging.Abstractions to 9.0.6 Bumps Microsoft.Extensions.Options to 8.0.0, 9.0.0, 9.0.6 Bumps Microsoft.FeatureManagement from 4.0.0 to 4.1.0 Bumps Microsoft.IdentityModel.Protocols.OpenIdConnect from 8.3.1 to 8.12.0 Bumps Microsoft.IdentityModel.Tokens from 8.3.1 to 8.12.0 Bumps Microsoft.NET.Test.Sdk from 17.1.0 to 17.14.1 Bumps Microsoft.TypeScript.MSBuild from 5.7.1 to 5.8.3 Bumps Microsoft.VisualStudio.Web.CodeGeneration.Design from 6.0.18 to 7.0.0 Bumps MK.IO from 1.6.0 to 2.1.3 Bumps NHSUKViewComponents.Web from 1.0.28 to 1.0.29 Bumps NLog.Schema from 5.3.4 to 5.5.0 Bumps NLog.Web.AspNetCore from 4.15.0 to 5.5.0 Bumps Selenium.Axe from 4.0.19 to 4.0.21 Bumps Selenium.Support from 4.19.0 to 4.33.0 Bumps Selenium.WebDriver from 4.19.0 to 4.33.0 Bumps Serilog.AspNetCore from 3.2.0 to 9.0.0 Bumps Swashbuckle.AspNetCore from 7.2.0 to 9.0.1 Bumps System.Configuration.ConfigurationManager to 9.0.6 Bumps System.Drawing.Common from 9.0.1 to 9.0.6 Bumps System.IdentityModel.Tokens.Jwt to 8.12.0 Bumps System.Security.Cryptography.Pkcs from 9.0.1 to 9.0.6 Bumps tusdotnet from 2.8.0 to 2.10.0 --- updated-dependencies: - dependency-name: AngleSharp dependency-version: 1.3.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: HtmlSanitizer dependency-version: 9.0.886 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AspNetCore.Authentication.ApiKey dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Options dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Options dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper dependency-version: 14.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper.Extensions.Microsoft.DependencyInjection dependency-version: 12.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper.Extensions.Microsoft.DependencyInjection dependency-version: 12.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper.Extensions.Microsoft.DependencyInjection dependency-version: 12.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper.Extensions.Microsoft.DependencyInjection dependency-version: 12.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AutoMapper.Extensions.Microsoft.DependencyInjection dependency-version: 12.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Azure.Messaging.ServiceBus dependency-version: 7.20.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Azure.Storage.Blobs dependency-version: 12.24.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Azure.Storage.Files.Shares dependency-version: 12.11.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Azure.Storage.Queues dependency-version: 12.22.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: coverlet.collector dependency-version: 6.0.4 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: EntityFrameworkCore.Testing.Moq dependency-version: 9.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore.Relational dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Options dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: FluentValidation dependency-version: 12.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: FluentValidation dependency-version: 12.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: FluentValidation.AspNetCore dependency-version: 11.3.1 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: FluentValidation.AspNetCore dependency-version: 11.3.1 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: FluentValidation.AspNetCore dependency-version: 11.3.1 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: HtmlAgilityPack dependency-version: 1.12.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.ApplicationInsights.AspNetCore dependency-version: 2.23.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.ApplicationInsights.EventCounterCollector dependency-version: 2.23.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.ApplicationInsights.NLogTarget dependency-version: 2.23.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer dependency-version: 8.0.17 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.Authentication.OpenIdConnect dependency-version: 8.0.17 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.Mvc.NewtonsoftJson dependency-version: 8.0.17 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.Mvc.Testing dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Options dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore.Relational dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Configuration.Abstractions dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore.Relational dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore.SqlServer dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Configuration.Abstractions dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore.Relational dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.EntityFrameworkCore.SqlServer dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Configuration.Abstractions dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Configuration.Json dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.Extensions.Options dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.FeatureManagement dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.IdentityModel.Protocols.OpenIdConnect dependency-version: 8.12.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.IdentityModel.Tokens dependency-version: 8.12.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: System.IdentityModel.Tokens.Jwt dependency-version: 8.12.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 17.14.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.TypeScript.MSBuild dependency-version: 5.8.3 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.VisualStudio.Web.CodeGeneration.Design dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: MK.IO dependency-version: 2.1.3 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: NHSUKViewComponents.Web dependency-version: 1.0.29 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: NLog.Schema dependency-version: 5.5.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: NLog.Web.AspNetCore dependency-version: 5.5.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Selenium.Axe dependency-version: 4.0.21 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Selenium.Support dependency-version: 4.33.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Selenium.WebDriver dependency-version: 4.33.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Serilog.AspNetCore dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Swashbuckle.AspNetCore dependency-version: 9.0.1 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: System.Configuration.ConfigurationManager dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: System.Configuration.ConfigurationManager dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: System.Configuration.ConfigurationManager dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: System.Drawing.Common dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: System.IdentityModel.Tokens.Jwt dependency-version: 8.12.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: System.IdentityModel.Tokens.Jwt dependency-version: 8.12.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: System.Security.Cryptography.Pkcs dependency-version: 9.0.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: tusdotnet dependency-version: 2.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 96 ++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8f1d8febf..1e0867add 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -15,77 +15,77 @@ - + - - - - - - + + + + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - + + + + + + - + - + - + - - - - + + + + From 949ec30db58a00f5d70f84934e06ab4ceee33ca6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 15:04:29 +0000 Subject: [PATCH 12/30] Bump AngleSharp and 4 others Bumps AngleSharp from 0.16.1 to 1.3.0 Bumps HtmlSanitizer from 6.0.453 to 9.0.886 Bumps Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation from 7.0.0 to 8.0.17 Bumps Microsoft.AspNetCore.Mvc.Testing from 7.0.0 to 8.0.17 Bumps Microsoft.VisualStudio.Web.CodeGeneration.Design from 7.0.0 to 9.0.0 --- updated-dependencies: - dependency-name: AngleSharp dependency-version: 1.3.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: HtmlSanitizer dependency-version: 9.0.886 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation dependency-version: 8.0.17 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.Mvc.Testing dependency-version: 8.0.17 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.VisualStudio.Web.CodeGeneration.Design dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 1e0867add..08005beae 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -43,8 +43,8 @@ - - + + @@ -64,7 +64,7 @@ - + From 07ff7c4794ffbc1f08b9f73040adae6f72507d2d Mon Sep 17 00:00:00 2001 From: Binon Date: Wed, 18 Jun 2025 08:43:14 +0100 Subject: [PATCH 13/30] Revering web.config --- LearningHub.Nhs.WebUI/web.config | 41 ++++++++++++--------------- WebAPI/LearningHub.Nhs.API/web.config | 38 +++++++++++-------------- 2 files changed, 35 insertions(+), 44 deletions(-) diff --git a/LearningHub.Nhs.WebUI/web.config b/LearningHub.Nhs.WebUI/web.config index 541f29920..837247997 100644 --- a/LearningHub.Nhs.WebUI/web.config +++ b/LearningHub.Nhs.WebUI/web.config @@ -1,26 +1,21 @@  - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/WebAPI/LearningHub.Nhs.API/web.config b/WebAPI/LearningHub.Nhs.API/web.config index 6483ee683..8771970fe 100644 --- a/WebAPI/LearningHub.Nhs.API/web.config +++ b/WebAPI/LearningHub.Nhs.API/web.config @@ -1,25 +1,21 @@  - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file From 868878f685b0b02adfe7d26a55ff7f403a0a9a46 Mon Sep 17 00:00:00 2001 From: AnjuJose011 <154979799+AnjuJose011@users.noreply.github.com> Date: Wed, 18 Jun 2025 10:09:44 +0100 Subject: [PATCH 14/30] Update Directory.Packages.props-System.IdentityModel.Tokens.Jwt --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 08005beae..cce46b124 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -83,11 +83,11 @@ - + - \ No newline at end of file + From bf84f42f9c58476d4948f41a28dbc54ae990d1c4 Mon Sep 17 00:00:00 2001 From: AnjuJose011 <154979799+AnjuJose011@users.noreply.github.com> Date: Wed, 18 Jun 2025 10:24:45 +0100 Subject: [PATCH 15/30] Update Directory.Packages.props-Automapper version --- Directory.Packages.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index cce46b124..516cfe4ef 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -18,8 +18,8 @@ - - + + From 63c876a312dba6f768b15deb6a791a4c83cbb93c Mon Sep 17 00:00:00 2001 From: AnjuJose011 <154979799+AnjuJose011@users.noreply.github.com> Date: Wed, 18 Jun 2025 10:49:04 +0100 Subject: [PATCH 16/30] Update Directory.Packages.props --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 516cfe4ef..8bde0b032 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -83,7 +83,7 @@ - + From 783909649e675d177073bff039f3a9bd7e816350 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Wed, 18 Jun 2025 11:42:43 +0100 Subject: [PATCH 17/30] For testing purpose commented the cache call. --- LearningHub.Nhs.WebUI/Services/UserGroupService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs index 6a4f62966..03581cb38 100644 --- a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs @@ -47,7 +47,8 @@ public UserGroupService( public async Task> GetRoleUserGroupDetailAsync() { var cacheKey = $"{this.contextAccessor.HttpContext.User.Identity.GetCurrentUserId()}:AllRolesWithPermissions"; - return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); + ////return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); + return await this.FetchRoleUserGroupDetailAsync(); } /// From 0fd95477794c4976cbb5bd8a16236b6c803c8bda Mon Sep 17 00:00:00 2001 From: binon Date: Wed, 18 Jun 2025 14:08:14 +0100 Subject: [PATCH 18/30] Delete nuget.config --- nuget.config | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 nuget.config diff --git a/nuget.config b/nuget.config deleted file mode 100644 index 33abf6d35..000000000 --- a/nuget.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - From 6463dfdac0ff73764202a00de7a8ddafda0220b6 Mon Sep 17 00:00:00 2001 From: OluwatobiAwe Date: Thu, 19 Jun 2025 14:13:19 +0100 Subject: [PATCH 19/30] LH Navigation Update --- .../LearningHub.Nhs.OpenApi/Controllers/UserController.cs | 8 +++++++- OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs index 1fb149c79..9d2aaea2e 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs @@ -299,7 +299,7 @@ private List> MenuItems(NavigationModel model) }, new Dictionary { - { "title", "My Contributions" }, + { "title", "My contributions" }, { "url", this.learningHubConfig.MyContributionsUrl }, { "visible", model.ShowMyContributions }, }, @@ -310,6 +310,12 @@ private List> MenuItems(NavigationModel model) { "visible", model.ShowMyBookmarks }, }, new Dictionary + { + { "title", "My learning" }, + { "url", this.learningHubConfig.MyLearningUrl }, + { "visible", model.ShowMyLearning }, + }, + new Dictionary { { "title", "Help" }, { "url", this.learningHubConfig.HelpUrl }, diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json b/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json index 804dc13f5..6ac065c23 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json +++ b/OpenAPI/LearningHub.Nhs.OpenApi/appsettings.json @@ -98,7 +98,7 @@ "MyRecordsUrl": "", "NotificationsUrl": "/notification", "RegisterUrl": "/register", - "SignOutUrl": "", + "SignOutUrl": "/home/logout", "MyAccountUrl": "/myaccount", "BrowseCataloguesUrl": "/allcatalogue" }, From e8c4abb004e83383947d3a4393cfc92fb55f02f3 Mon Sep 17 00:00:00 2001 From: OluwatobiAwe Date: Thu, 19 Jun 2025 15:58:35 +0100 Subject: [PATCH 20/30] lh update --- .../Services/IUserGroupService.cs | 16 +++++++ .../Services/NavigationPermissionService.cs | 12 +++-- .../Services/UserGroupService.cs | 45 +++++++++++++++++++ .../Startup.cs | 1 + 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IUserGroupService.cs create mode 100644 OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IUserGroupService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IUserGroupService.cs new file mode 100644 index 000000000..bd2f4e920 --- /dev/null +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/Services/IUserGroupService.cs @@ -0,0 +1,16 @@ +namespace LearningHub.Nhs.OpenApi.Services.Interface.Services +{ + using System.Threading.Tasks; + + /// + /// The UserGroupService interface. + /// + public interface IUserGroupService + { + /// + /// The GetRoleUserGroupDetailAsync. + /// + /// The . + Task UserHasCatalogueContributionPermission(int userId); + } +} diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs index 76e66812f..e0bef0a1d 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/NavigationPermissionService.cs @@ -12,14 +12,17 @@ public class NavigationPermissionService : INavigationPermissionService { private readonly IResourceService resourceService; + private readonly IUserGroupService userGroupService; /// /// Initializes a new instance of the class. /// /// Resource service. - public NavigationPermissionService(IResourceService resourceService) + /// userGroup service. + public NavigationPermissionService(IResourceService resourceService, IUserGroupService userGroupService) { this.resourceService = resourceService; + this.userGroupService = userGroupService; } /// @@ -53,7 +56,7 @@ public async Task GetNavigationModelAsync(IPrincipal user, bool } else if (user.IsInRole("BlueUser")) { - return AuthenticatedBlueUser(controllerName); + return await AuthenticatedBlueUser(controllerName, user.Identity.GetCurrentUserId()); } else { @@ -114,12 +117,13 @@ private NavigationModel AuthenticatedAdministrator(string controllerName) /// The AuthenticatedBlueUser. /// /// The controller name. + /// The userId. /// The . - private NavigationModel AuthenticatedBlueUser(string controllerName) + private async Task AuthenticatedBlueUser(string controllerName, int userId) { return new NavigationModel() { - ShowMyContributions = true, + ShowMyContributions = await this.userGroupService.UserHasCatalogueContributionPermission(userId), ShowMyLearning = true, ShowMyBookmarks = true, ShowSearch = controllerName != "search" && controllerName != string.Empty, diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs new file mode 100644 index 000000000..205494eca --- /dev/null +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs @@ -0,0 +1,45 @@ +namespace LearningHub.Nhs.OpenApi.Services.Services +{ + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; + using LearningHub.Nhs.Caching; + using LearningHub.Nhs.Models.Enums; + using LearningHub.Nhs.Models.Extensions; + using LearningHub.Nhs.Models.User; + using LearningHub.Nhs.OpenApi.Repositories.Interface.Repositories; + using LearningHub.Nhs.OpenApi.Services.Interface.Services; + using Microsoft.AspNetCore.Http; + + /// + /// The user group service. + /// + public class UserGroupService : IUserGroupService + { + + private readonly IRoleUserGroupRepository roleUserGroupRepository; + + /// + /// Initializes a new instance of the class. + /// + /// roleUserGroupRepository. + public UserGroupService(IRoleUserGroupRepository roleUserGroupRepository) + { + this.roleUserGroupRepository = roleUserGroupRepository; + } + + + /// + public async Task UserHasCatalogueContributionPermission(int userId) + { + var userRoleGroups = await this.roleUserGroupRepository.GetRoleUserGroupViewModelsByUserId(userId); + if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleEnum == RoleEnum.LocalAdmin || r.RoleEnum == RoleEnum.Editor)) + { + return true; + } + + return false; + } + + } +} diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Startup.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Startup.cs index f620c101b..b92103a2f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Startup.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Startup.cs @@ -31,6 +31,7 @@ public static void AddServices(this IServiceCollection services) services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddScoped(); services.AddScoped(); From 23cc87feeaf1f9bb66bcbb77654a1a1c6c54ccd7 Mon Sep 17 00:00:00 2001 From: Binon Date: Thu, 19 Jun 2025 18:18:22 +0100 Subject: [PATCH 21/30] Revering cpm changes --- .../LearningHub.Nhs.AdminUI.csproj | 1274 +++++++++-------- Directory.Packages.props | 2 +- ...rningHub.Nhs.WebUI.AutomatedUiTests.csproj | 66 +- LearningHub.Nhs.WebUI.sln | 1 - .../LearningHub.Nhs.WebUI.csproj | 496 +++---- .../LearningHub.Nhs.OpenApi.Models.csproj | 39 +- ....Nhs.OpenApi.Repositories.Interface.csproj | 46 +- ...earningHub.Nhs.OpenApi.Repositories.csproj | 58 +- ...gHub.Nhs.OpenApi.Services.Interface.csproj | 46 +- .../LearningHub.Nhs.OpenApi.Services.csproj | 74 +- .../LearningHub.Nhs.OpenApi.Tests.csproj | 57 +- .../LearningHub.NHS.OpenAPI.csproj | 79 +- ...ub.Nhs.ReportApi.Services.Interface.csproj | 51 +- ...ub.Nhs.ReportApi.Services.UnitTests.csproj | 84 +- .../LearningHub.Nhs.ReportApi.Services.csproj | 64 +- .../LearningHub.Nhs.ReportApi.Shared.csproj | 46 +- .../LearningHub.Nhs.ReportApi.csproj | 37 +- .../LearningHub.Nhs.Api.csproj | 126 +- WebAPI/LearningHub.Nhs.API/web.config | 39 +- .../LearningHub.Nhs.Api.Shared.csproj | 33 +- .../LearningHub.Nhs.Api.UnitTests.csproj | 62 +- ...earningHub.Nhs.Repository.Interface.csproj | 32 +- .../LearningHub.Nhs.Repository.csproj | 44 +- .../LearningHub.Nhs.Services.Interface.csproj | 55 +- .../LearningHub.Nhs.Services.UnitTests.csproj | 87 +- .../LearningHub.Nhs.Services.csproj | 70 +- ...earningHub.Nhs.Migration.ConsoleApp.csproj | 125 +- ...LearningHub.Nhs.Migration.Interface.csproj | 40 +- .../LearningHub.Nhs.Migration.Models.csproj | 37 +- ...ub.Nhs.Migration.Staging.Repository.csproj | 49 +- ...LearningHub.Nhs.Migration.UnitTests.csproj | 64 +- .../LearningHub.Nhs.Migration.csproj | 54 +- 32 files changed, 1810 insertions(+), 1627 deletions(-) diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index ce9830312..a0de54f8f 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -1,631 +1,645 @@ - - net8.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 - 31abd8b9-4223-4ff3-896b-a46530c9e15c - /subscriptions/57c55d5f-78c1-4373-a021-ff8357548f51/resourceGroups/LearningHubNhsUk-AdminUI-Prod-RG/providers/microsoft.insights/components/LearningHubNhsUk-AdminUI-Prod - true - true - x64 - - - - - - - - - - - - - - - - - - - - - <_ContentIncludedByDefault Remove="bundleconfig.json" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - - - - - - \ No newline at end of file + + + net8.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 + 31abd8b9-4223-4ff3-896b-a46530c9e15c + /subscriptions/57c55d5f-78c1-4373-a021-ff8357548f51/resourceGroups/LearningHubNhsUk-AdminUI-Prod-RG/providers/microsoft.insights/components/LearningHubNhsUk-AdminUI-Prod + true + true + x64 + + + + + + + + + + + + + + + + + + + + + + + + <_ContentIncludedByDefault Remove="bundleconfig.json" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + + + + + + + + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props index 8bde0b032..59413f8ea 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,7 +2,7 @@ - true + false diff --git a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj index e12ccd3f4..1569f9734 100644 --- a/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj +++ b/LearningHub.Nhs.WebUI.AutomatedUiTests/LearningHub.Nhs.WebUI.AutomatedUiTests.csproj @@ -1,31 +1,37 @@ - - net8.0 - enable - enable - false - True - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - \ No newline at end of file + + + net8.0 + enable + enable + + false + + True + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/LearningHub.Nhs.WebUI.sln b/LearningHub.Nhs.WebUI.sln index 433e58877..55cce01f0 100644 --- a/LearningHub.Nhs.WebUI.sln +++ b/LearningHub.Nhs.WebUI.sln @@ -9,7 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props - nuget.config = nuget.config StyleCop.ruleset = StyleCop.ruleset EndProjectSection EndProject diff --git a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj index 24d3c72f8..dc2cf661d 100644 --- a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj +++ b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj @@ -1,242 +1,256 @@  - - net8.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 - InProcess - a2ecb5d2-cf13-4551-9cb6-3d86dfbcf8ef - true - true - x64 - true - - - Project - http://localhost:5001 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - Always - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - \ No newline at end of file + + + net8.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 + InProcess + a2ecb5d2-cf13-4551-9cb6-3d86dfbcf8ef + true + true + x64 + true + + + + Project + http://localhost:5001 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj index baf3dee90..727560e3f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj @@ -1,18 +1,23 @@ - - net8.0 - true - enable - x64 - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + true + enable + x64 + + + + + + + + + + + + + + + + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj index 1617cfa0d..cbab74f45 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj @@ -1,21 +1,27 @@ - - net8.0 - LearningHub.Nhs.OpenApi.Repositories.Interface - enable - true - x64 - - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + LearningHub.Nhs.OpenApi.Repositories.Interface + enable + true + x64 + + + + + + + + + + + + + + + + + + + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj index effe5591f..009e83ef8 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj @@ -1,27 +1,33 @@ - - net8.0 - LearningHub.Nhs.OpenApi.Repositories - enable - true - x64 - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + LearningHub.Nhs.OpenApi.Repositories + enable + true + x64 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj index 274460624..aa019e18c 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj @@ -1,21 +1,27 @@ - - net8.0 - enable - true - x64 - - - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + enable + true + x64 + + + + + + + + + + + + + + + + + + + + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index 465bda0cd..9002a0237 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -1,35 +1,41 @@ - - net8.0 - LearningHub.Nhs.OpenApi.Services - enable - true - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + LearningHub.Nhs.OpenApi.Services + enable + true + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj index 8974e0fdb..3efc63b33 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj @@ -1,28 +1,31 @@ - - net8.0 - false - enable - x64 - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - \ No newline at end of file + + + net8.0 + false + enable + x64 + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj index 0871850e4..dfa347ffe 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj @@ -1,37 +1,44 @@ - - enable - net8.0 - true - x64 - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - \ No newline at end of file + + + enable + net8.0 + true + x64 + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj index b8c9379fa..227e30bf8 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj @@ -1,23 +1,30 @@ - - net8.0 - enable - enable - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj index 114d8ae76..3af90e39a 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj @@ -1,38 +1,46 @@ - - - net8.0 - enable - enable - false - - - - - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - - \ No newline at end of file + + + + net8.0 + enable + enable + + false + + + + + + + + + + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + + + + + + + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj index fe3bf575b..c6d03d856 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj @@ -1,29 +1,37 @@ - - net8.0 - enable - enable - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj index b32e219f3..78f41769e 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj @@ -1,21 +1,27 @@ - - net8.0 - enable - enable - $(NoWarn),1573,1591,1712 - True - - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + enable + enable + $(NoWarn),1573,1591,1712 + True + + + + + + + + + + + + + + + + + + + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj index 17b31c21d..f87bb47d5 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj @@ -1,31 +1,42 @@ + net8.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 enable enable False + + - - - - - - - + + + + + + + + + + + + + + + PreserveNewest @@ -33,12 +44,14 @@ PreserveNewest + PreserveNewest + - - \ No newline at end of file + + diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index 834f8d32c..3b09a079f 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -1,60 +1,68 @@  - - net8.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 - InProcess - 234b55ad-984b-47ae-9d7a-71e372e6ded7 - true - x64 - - - LearningHub.Nhs.Api.xml - - - - - - - Always - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + net8.0 + 1.0.0.0 + 1.0.0.0 + 1.0.0 + InProcess + 234b55ad-984b-47ae-9d7a-71e372e6ded7 + true + x64 + + + + LearningHub.Nhs.Api.xml + + + + + + + + + Always + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebAPI/LearningHub.Nhs.API/web.config b/WebAPI/LearningHub.Nhs.API/web.config index 8771970fe..798b63b5d 100644 --- a/WebAPI/LearningHub.Nhs.API/web.config +++ b/WebAPI/LearningHub.Nhs.API/web.config @@ -1,21 +1,26 @@  - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj index 1cfafdb8e..1963fd724 100644 --- a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj +++ b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj @@ -1,16 +1,19 @@ - - net8.0 - true - x64 - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj index b024beaf5..e7a054e23 100644 --- a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj @@ -1,30 +1,34 @@ - - net8.0 - true - false - x64 - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - \ No newline at end of file + + + net8.0 + true + false + x64 + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj index 91c49b25f..7e09ec673 100644 --- a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj @@ -1,23 +1,27 @@ + net8.0 true - x64 + x64 + - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - + + - \ No newline at end of file + + diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj index 836a83129..6da0f9200 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj @@ -1,21 +1,25 @@ - - net8.0 - true - x64 - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj index 636f10a2e..024756991 100644 --- a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj @@ -1,26 +1,31 @@ - - net8.0 - true - x64 - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj index 08a04e008..6b6743743 100644 --- a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj @@ -1,42 +1,47 @@ - - net8.0 - true - false - x64 - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - - - - - PreserveNewest - - - \ No newline at end of file + + + net8.0 + true + false + x64 + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj index 38c383d6c..44f8119cb 100644 --- a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj +++ b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj @@ -1,34 +1,38 @@ - - net8.0 - true - x64 - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj index 0a2e1e509..73e18184e 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj @@ -1,60 +1,67 @@ - - Exe - net8.0 - 7.3 - true - x64 - - - - - - - PreserveNewest - true - PreserveNewest - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - Always - - - PreserveNewest - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - \ No newline at end of file + + + Exe + net8.0 + 7.3 + true + x64 + + + + + + + + + PreserveNewest + true + PreserveNewest + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + Always + + + PreserveNewest + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj index 75f4e5e58..7b945c483 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj @@ -1,19 +1,23 @@ - - net8.0 - true - x64 - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj index 9801da32e..189b0348e 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj @@ -1,18 +1,21 @@ - - net8.0 - true - x64 - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj index e21f4c7a4..090dce6fc 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj @@ -1,23 +1,28 @@ - - net8.0 - true - x64 - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj index 48f23a40b..a9b7683f7 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj @@ -1,31 +1,35 @@ - - net8.0 - true - false - x64 - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - \ No newline at end of file + + + net8.0 + true + false + x64 + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj index 9082047ec..71195c130 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj @@ -1,26 +1,30 @@ - - net8.0 - true - x64 - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - \ No newline at end of file + + + net8.0 + true + x64 + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + From 87b37888347b7dbdd7cee8751bb2621ff2d525aa Mon Sep 17 00:00:00 2001 From: OluwatobiAwe Date: Mon, 23 Jun 2025 08:00:45 +0100 Subject: [PATCH 22/30] Changed the LH menu item order --- .../Controllers/UserController.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs index 9d2aaea2e..6e5fe2591 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi/Controllers/UserController.cs @@ -298,6 +298,12 @@ private List> MenuItems(NavigationModel model) { "visible", model.ShowBrowseCatalogues }, }, new Dictionary + { + { "title", "My learning" }, + { "url", this.learningHubConfig.MyLearningUrl }, + { "visible", model.ShowMyLearning }, + }, + new Dictionary { { "title", "My contributions" }, { "url", this.learningHubConfig.MyContributionsUrl }, @@ -310,12 +316,6 @@ private List> MenuItems(NavigationModel model) { "visible", model.ShowMyBookmarks }, }, new Dictionary - { - { "title", "My learning" }, - { "url", this.learningHubConfig.MyLearningUrl }, - { "visible", model.ShowMyLearning }, - }, - new Dictionary { { "title", "Help" }, { "url", this.learningHubConfig.HelpUrl }, From 73aa0c2b69f0d38f2dcbd799b95078afbf998bd9 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Wed, 25 Jun 2025 09:41:35 +0100 Subject: [PATCH 23/30] TD-5708:Users Cannot Upload files on Test and Live Learning Hub Due to Password Prompt Loop --- LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts index 9f50357fc..ab81695ea 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts @@ -67,7 +67,8 @@ const IsSystemAdmin = async function (): Promise { }; const IsValidUser = async function (currentPassword: string): Promise { - var IsValidUser = `/api/User/ConfirmPassword/${currentPassword}`; + let encodedPassword = encodeURIComponent(currentPassword); + var IsValidUser = `/api/User/ConfirmPassword/${encodedPassword}`; return await AxiosWrapper.axios.get(IsValidUser) .then(response => { return response.data; From 2049905b039f2d6f8c3ff05a7ea72a7f12e2699c Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Wed, 25 Jun 2025 16:07:59 +0100 Subject: [PATCH 24/30] TD-5715: My accessed learning tray - navigation link doesn't work --- LearningHub.Nhs.WebUI/Controllers/HomeController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs index 18e3b82fe..6d578a339 100644 --- a/LearningHub.Nhs.WebUI/Controllers/HomeController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/HomeController.cs @@ -280,6 +280,10 @@ public async Task LoadPage(string dashBoardTray = "my-learning", Catalogues = new Nhs.Models.Dashboard.DashboardCatalogueResponseViewModel { Type = catalogueDashBoard }, }; + var enableMoodle = Task.Run(() => this.featureManager.IsEnabledAsync(FeatureFlags.EnableMoodle)).Result; + this.ViewBag.EnableMoodle = enableMoodle; + this.ViewBag.ValidMoodleUser = this.CurrentMoodleUserId > 0; + bool isAjax = this.HttpContext.Request.Headers["X-Requested-With"] == "XMLHttpRequest"; if (isAjax) From 0c3009f8889559c50b59e13f4cf3f3a6860ada5b Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Thu, 26 Jun 2025 17:15:37 +0100 Subject: [PATCH 25/30] TD-5665: Community Contribution Suspend --- .../components/CatalogueSelectorAccordion.vue | 1 - .../Scripts/vuesrc/contribute/CatalogueSelect.vue | 3 +-- LearningHub.Nhs.WebUI/Services/UserGroupService.cs | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue index fcd1e60a3..087d14625 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue @@ -20,7 +20,6 @@

You can contribute a resource as an editor of a catalogue or in your own name. - To contribute a resource in your own name, select Community contributions from the drop down menu.

You can manage all resources that you have contributed in the My contributions area. diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue index 379e9572a..3f5c7400d 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue @@ -26,8 +26,7 @@ A catalogue is a curated set of resources that has its own web page.

- You can contribute a resource as an editor of a catalogue or in your own name. - To contribute a resource in your own name, select Community contributions from the drop down menu. + You can contribute a resource as an editor of a catalogue or in your own name.

You can manage all resources that you have contributed in the My contributions area. diff --git a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs index 03581cb38..01db066e4 100644 --- a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs @@ -62,7 +62,7 @@ public async Task> GetRoleUserGroupDetailForUserAsy public async Task UserHasCatalogueContributionPermission() { var userRoleGroups = await this.GetRoleUserGroupDetailAsync(); - if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleEnum == RoleEnum.LocalAdmin || r.RoleEnum == RoleEnum.Editor)) + if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleEnum == RoleEnum.Editor)) { return true; } From 09c49db5b936535a6e52235d0d2fd659d8487cdb Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Thu, 26 Jun 2025 17:24:59 +0100 Subject: [PATCH 26/30] Corrected the sentence --- .../components/CatalogueSelectorAccordion.vue | 2 +- .../Scripts/vuesrc/contribute/CatalogueSelect.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue index 087d14625..e1ba6eeae 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute-resource/components/CatalogueSelectorAccordion.vue @@ -19,7 +19,7 @@ A catalogue is a curated set of resources that has its own web page.

- You can contribute a resource as an editor of a catalogue or in your own name. + You can contribute a resource as an editor of a catalogue.

You can manage all resources that you have contributed in the My contributions area. diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue index 3f5c7400d..6d942b072 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/contribute/CatalogueSelect.vue @@ -26,7 +26,7 @@ A catalogue is a curated set of resources that has its own web page.

- You can contribute a resource as an editor of a catalogue or in your own name. + You can contribute a resource as an editor of a catalogue.

You can manage all resources that you have contributed in the My contributions area. From 7af1e40fe0bb31afc3c09be17c651f38b2f9dbef Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Fri, 27 Jun 2025 15:02:33 +0100 Subject: [PATCH 27/30] TD-5708: Password validation is failing for the users with password '&; --- .../Controllers/Api/UserController.cs | 10 +++++----- .../Scripts/vuesrc/data/user.ts | 17 ++++++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/Api/UserController.cs b/LearningHub.Nhs.WebUI/Controllers/Api/UserController.cs index 35294cc11..1f5330bbe 100644 --- a/LearningHub.Nhs.WebUI/Controllers/Api/UserController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/Api/UserController.cs @@ -102,13 +102,13 @@ public async Task CheckUserRole() ///

/// to check user password is correct. /// - /// The currentPassword. + /// The currentPassword. /// The . - [HttpGet] - [Route("ConfirmPassword/{currentPassword}")] - public async Task ConfirmPassword(string currentPassword) + [HttpPost] + [Route("ConfirmPassword")] + public async Task ConfirmPassword([FromBody] PasswordUpdateModel password) { - string passwordHash = this.userService.Base64MD5HashDigest(currentPassword); + string passwordHash = this.userService.Base64MD5HashDigest(password.PasswordHash); var userPersonalDetails = await this.userService.GetCurrentUserPersonalDetailsAsync(); if (userPersonalDetails != null && userPersonalDetails.PasswordHash == passwordHash) { diff --git a/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts b/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts index ab81695ea..e38fd4a08 100644 --- a/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts +++ b/LearningHub.Nhs.WebUI/Scripts/vuesrc/data/user.ts @@ -67,16 +67,15 @@ const IsSystemAdmin = async function (): Promise { }; const IsValidUser = async function (currentPassword: string): Promise { - let encodedPassword = encodeURIComponent(currentPassword); - var IsValidUser = `/api/User/ConfirmPassword/${encodedPassword}`; - return await AxiosWrapper.axios.get(IsValidUser) - .then(response => { - return response.data; - }) - .catch(e => { - console.log('IsValidUser:' + e); - throw e; + try { + const response = await AxiosWrapper.axios.post('/api/User/ConfirmPassword', { + PasswordHash: currentPassword }); + return response.data; + } catch (e) { + console.error('IsValidUser:', e); + throw e; + } }; const getCurrentUserBasicDetails = async function (): Promise { From 102ebab31fb9ed2a421f57d4d8de4e0ffbae0ca0 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Wed, 2 Jul 2025 12:02:27 +0100 Subject: [PATCH 28/30] Reverted the commented code --- LearningHub.Nhs.WebUI/Services/UserGroupService.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs index 01db066e4..c9b196bfc 100644 --- a/LearningHub.Nhs.WebUI/Services/UserGroupService.cs +++ b/LearningHub.Nhs.WebUI/Services/UserGroupService.cs @@ -47,8 +47,7 @@ public UserGroupService( public async Task> GetRoleUserGroupDetailAsync() { var cacheKey = $"{this.contextAccessor.HttpContext.User.Identity.GetCurrentUserId()}:AllRolesWithPermissions"; - ////return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); - return await this.FetchRoleUserGroupDetailAsync(); + return await this.cacheService.GetOrFetchAsync(cacheKey, () => this.FetchRoleUserGroupDetailAsync()); } /// From a383b7290eedf63d794acb3fd22523e9b55c811d Mon Sep 17 00:00:00 2001 From: binon Date: Fri, 4 Jul 2025 12:54:01 +0100 Subject: [PATCH 29/30] Update continuous-integration-workflow.yml --- .../continuous-integration-workflow.yml | 96 ++++--------------- 1 file changed, 16 insertions(+), 80 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 24c2d6891..94fca85b0 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -9,67 +9,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 - - - name: Modify web.config files in all apps - shell: pwsh - run: | - $webConfigPaths = @( - "${{ github.workspace }}\AdminUI\LearningHub.Nhs.AdminUI\web.config", - "${{ github.workspace }}\WebAPI\LearningHub.Nhs.Api\web.config", - "${{ github.workspace }}\LearningHub.Nhs.WebUI\web.config" - ) - - foreach ($path in $webConfigPaths) { - if (Test-Path $path) { - Write-Host "Modifying $path" - [xml]$config = Get-Content $path - - if (-not $config.configuration.'system.webServer') { - $systemWebServer = $config.CreateElement("system.webServer") - $config.configuration.AppendChild($systemWebServer) | Out-Null - } else { - $systemWebServer = $config.configuration.'system.webServer' - } - - if (-not $systemWebServer.httpProtocol) { - $httpProtocol = $config.CreateElement("httpProtocol") - $systemWebServer.AppendChild($httpProtocol) | Out-Null - } else { - $httpProtocol = $systemWebServer.httpProtocol - } - - if (-not $httpProtocol.customHeaders) { - $customHeaders = $config.CreateElement("customHeaders") - $httpProtocol.AppendChild($customHeaders) | Out-Null - } else { - $customHeaders = $httpProtocol.customHeaders - } - - foreach ($name in @("X-Powered-By", "Server")) { - $removeNode = $config.CreateElement("remove") - $removeNode.SetAttribute("name", $name) - $customHeaders.AppendChild($removeNode) | Out-Null - } - - if (-not $systemWebServer.security) { - $security = $config.CreateElement("security") - $systemWebServer.AppendChild($security) | Out-Null - } else { - $security = $systemWebServer.security - } - - if (-not $security.requestFiltering) { - $requestFiltering = $config.CreateElement("requestFiltering") - $requestFiltering.SetAttribute("removeServerHeader", "true") - $security.AppendChild($requestFiltering) | Out-Null - } - - $config.Save($path) - } else { - Write-Host "File not found: $path" - } - } - + - name: Setup .NET Core SDK 8.0 uses: actions/setup-dotnet@v3 with: @@ -80,30 +20,27 @@ jobs: dotnet nuget remove source LearningHubFeed || true dotnet nuget add source 'https://pkgs.dev.azure.com/e-LfH/_packaging/LearningHubFeed/nuget/v3/index.json' --name 'LearningHubFeed' --username 'kevin.whittaker' --password ${{ secrets.AZURE_DEVOPS_PAT }} --store-password-in-clear-text - - name: Use Node 20 with Yarn + - name: Use Node 14 uses: actions/setup-node@v4 with: - node-version: '20' - cache: 'npm' - - - name: Upgrade npm to the latest version - run: npm install -g npm@6.14.8 + node-version: '14' + cache: 'npm' - - name: Typescript install WebUI - run: yarn install --network-timeout 600000 --frozen-lockfile + - name: npm install WebUI + run: npm install working-directory: ./LearningHub.Nhs.WebUI - - - name: Typescript build WebUI - run: yarn build:webpack + + - name: npm build WebUI + run: npm run build:webpack working-directory: ./LearningHub.Nhs.WebUI - - name: Typescript install AdminUI - run: yarn install + - name: npm install AdminUI + run: npm install working-directory: ./AdminUI/LearningHub.Nhs.AdminUI - - - name: Typescript build AdminUI - run: yarn build:webpack - working-directory: ./AdminUI/LearningHub.Nhs.AdminUI + + - name: npm build AdminUI + run: npm run build:webpack + working-directory: ./AdminUI/LearningHub.Nhs.AdminUI - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.0.3 @@ -183,5 +120,4 @@ jobs: } # - name: Test - # run: dotnet test ${{ env.BuildParameters.TestProjects }} - + # run: dotnet test ${{ env.BuildParameters.TestProjects }} From 01872637c72092db8ca82504e4325798a5314c5d Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Tue, 8 Jul 2025 11:17:39 +0100 Subject: [PATCH 30/30] Merge RC into 5490 Branch --- .../Services/UserGroupService.cs | 29 ++++++++++--------- .../LearningHub.Nhs.OpenApi.Tests.csproj | 1 + .../Services/Services/ResourceServiceTests.cs | 4 +-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs index e5c77a8ce..98902ca7d 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/UserGroupService.cs @@ -49,11 +49,6 @@ public class UserGroupService : IUserGroupService ///
private IScopeRepository scopeRepository; - /// - /// The role user group repository. - /// - private IRoleUserGroupRepository roleUserGroupRepository; - /// /// The user group attribute repository. /// @@ -63,12 +58,10 @@ public class UserGroupService : IUserGroupService /// Initializes a new instance of the class. /// /// roleUserGroupRepository. - public UserGroupService(IRoleUserGroupRepository roleUserGroupRepository) /// The catalogue service. /// The user group repository. /// The user - user group repository. /// The scope repository. - /// The role - user group repository. /// The user group attribute repository. /// The mapper. public UserGroupService( @@ -110,6 +103,18 @@ public async Task GetByIdAsync(int id, bool includeRoles) return await userGroupRepository.GetByIdAsync(id, includeRoles); } + /// + public async Task UserHasCatalogueContributionPermission(int userId) + { + var userRoleGroups = await this.roleUserGroupRepository.GetRoleUserGroupViewModelsByUserId(userId); + if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleEnum == RoleEnum.LocalAdmin || r.RoleEnum == RoleEnum.Editor)) + { + return true; + } + + return false; + } + /// /// The create async. /// @@ -927,18 +932,16 @@ private IQueryable OrderUserGroupItems(IQueryable items, s break; default: if (sortDirection == "D") - { - var userRoleGroups = await this.roleUserGroupRepository.GetRoleUserGroupViewModelsByUserId(userId); - if (userRoleGroups != null && userRoleGroups.Any(r => r.RoleEnum == RoleEnum.LocalAdmin || r.RoleEnum == RoleEnum.Editor)) + { items = items.OrderByDescending(x => x.Id); } else - { + { items = items.OrderBy(x => x.Id); - } + } break; - } + } return items; } diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj index 3efc63b33..c16540ee6 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj @@ -25,6 +25,7 @@ + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/Services/Services/ResourceServiceTests.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/Services/Services/ResourceServiceTests.cs index e9eba00aa..ce60ea029 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/Services/Services/ResourceServiceTests.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/Services/Services/ResourceServiceTests.cs @@ -6,7 +6,6 @@ namespace LearningHub.Nhs.OpenApi.Tests.Services.Services using System.Net; using System.Threading.Tasks; using AutoMapper; - using FizzWare.NBuilder; using FluentAssertions; using LearningHub.Nhs.Models.Entities.Activity; using LearningHub.Nhs.Models.Entities.Resource; @@ -24,9 +23,8 @@ namespace LearningHub.Nhs.OpenApi.Tests.Services.Services using LearningHub.Nhs.OpenApi.Tests.TestHelpers; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; - using Moq; + using Moq; using Xunit; public class ResourceServiceTests