diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index baa6759..3293c61 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -18,7 +18,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 NuGet 5.8 uses: nuget/setup-nuget@v1 diff --git a/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj b/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj index b585050..8396508 100644 --- a/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj +++ b/Auth/LearningHub.Nhs.Auth.Tests/LearningHub.Nhs.Auth.Tests.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/Auth/LearningHub.Nhs.Auth/Controllers/AccountController.cs b/Auth/LearningHub.Nhs.Auth/Controllers/AccountController.cs index 123fe1a..3018203 100644 --- a/Auth/LearningHub.Nhs.Auth/Controllers/AccountController.cs +++ b/Auth/LearningHub.Nhs.Auth/Controllers/AccountController.cs @@ -277,7 +277,7 @@ public async Task Logout(LogoutInputModel model) { UserId = userId, UserHistoryTypeId = (int)UserHistoryType.Logout, - Detail = @"User logged out", + Detail = @"User logged out" + this.webSettings.IsPasswordUpdate + " " + vm.TriggerExternalSignout, }; await this.UserService.StoreUserHistoryAsync(userHistory); diff --git a/Auth/LearningHub.Nhs.Auth/Controllers/HomeController.cs b/Auth/LearningHub.Nhs.Auth/Controllers/HomeController.cs index aa0937f..9d1ae11 100644 --- a/Auth/LearningHub.Nhs.Auth/Controllers/HomeController.cs +++ b/Auth/LearningHub.Nhs.Auth/Controllers/HomeController.cs @@ -83,18 +83,18 @@ public async Task Error() /// /// IsPasswordUpdateMethod. /// - /// The Logout. + /// The PasswordUpdate. /// The . [HttpGet] - public IActionResult SetIsPasswordUpdate(bool isLogout) + public IActionResult SetIsPasswordUpdate(bool isPasswordUpdate) { - if (isLogout) + if (isPasswordUpdate) { - this.webSettings.IsPasswordUpdate = false; + this.webSettings.IsPasswordUpdate = true; } else { - this.webSettings.IsPasswordUpdate = true; + this.webSettings.IsPasswordUpdate = false; } var redirectUri = $"{this.webSettings.LearningHubWebClient}Home/UserLogout"; diff --git a/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj b/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj index d9827ab..55206bc 100644 --- a/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj +++ b/Auth/LearningHub.Nhs.Auth/LearningHub.Nhs.Auth.csproj @@ -101,12 +101,12 @@ - + - + diff --git a/Auth/LearningHub.Nhs.Auth/Program.cs b/Auth/LearningHub.Nhs.Auth/Program.cs index 04759f5..e8e8172 100644 --- a/Auth/LearningHub.Nhs.Auth/Program.cs +++ b/Auth/LearningHub.Nhs.Auth/Program.cs @@ -34,6 +34,21 @@ .AllowAnyHeader()); }); +string moodleInstanceBridgeOrigin = builder.Configuration.GetValue("LearningHubAuthConfig:AuthClients:moodleinstancebridge:BaseUrl"); + +builder.Services.AddCors(options => +{ + options.AddPolicy("CorsPolicy", policy => + { + policy.WithOrigins( + corsOriginUrl, + moodleInstanceBridgeOrigin) + .AllowAnyHeader() + .AllowAnyMethod() + .AllowCredentials(); + }); +}); + builder.Services.ConfigureServices(builder.Configuration, builder.Environment); GlobalDiagnosticsContext.Set("connectionString", builder.Configuration.GetSection("ASPNETCORE_ConnectionStrings")["NLogDb"]); diff --git a/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/common.scss b/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/common.scss index ed13eb8..5b87bdf 100644 --- a/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/common.scss +++ b/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/common.scss @@ -1,80 +1,4 @@ @use "../abstracts/all" as *; -@use "nhsuk" as *; - -.nhsuk-u-font-style-italic { - font-style: italic; -} - -.nhsuk-button--red { - background-color: $nhsuk-red !important; - - &:hover { - background-color: $nhsuk-red-hover !important; - border-color: $nhsuk-red-hover !important; - } -} - -.nhsuk-button--beta-login { - background-color: $nhsuk-blue; - box-shadow: 0 4px 0 #002f5c; -} - -.nhsuk-button--beta-login:hover { - background-color: $nhsuk-btn-blue-hover; -} - -// By default, the text on reverse (white) buttons turns white once clicked, rendering them invisible. -.nhsuk-button--reverse:visited { - color: $nhsuk-black -} - -.nhsuk-back-link { - padding: px2rem(20) 0; - margin-bottom: 0; -} - -.nhsuk-radios__divider { - text-align: left; - width: unset; -} - -.nhsuk-radios__item label { - font-family: $font-stack; -} - -/* Conditional radio buttons - Note: The nhsuk-radios__conditional element needs to be a SIBLING of the radio button input element - otherwise the CSS selector won't work. See Views/Bookmark/Move.cshtml for a usage example. - The NHSUK component (nhsuk-radios__conditional) requires JavaScript to work. These tweaks allow it to work without. -*/ -.nhsuk-radios__conditional { - display: none; - margin-left: -22px; - margin-top: 8px; -} - -.nhsuk-radios__input:checked ~ .nhsuk-radios__conditional { - display: block !important; -} - -/* jquery unbobtrusive validation style over */ -.nhsuk-error-summary__list li { - color: $nhsuk-red; -} - -.nhsuk-form-group.input-validation-error { - @extend .nhsuk-form-group--error; -} - -.nhsuk-input.input-validation-error { - @extend .nhsuk-input--error -} - -.nhsuk-input:focus { - border: 2px solid #212b32; - box-shadow: inset 0 0 0 2px; - outline: 4px solid #ffeb3b; /* 1 */ - outline-offset: 0; -} .display--hide { display: none !important; @@ -119,81 +43,6 @@ display: block !important; } - -.nhsuk-bg-light-blue { - background-color: $nhsuk-light-blue-color; -} - -.nhsuk-bg-pale-blue { - background-color: $nhsuk-pale-blue-color; -} - -.nhsuk-bg-white { - background-color: $color_nhsuk-white; -} - -.nhsuk-width-container.search-width-container { - max-width: px2rem(752); - margin: 0 auto; - padding-left: px2rem(68); - padding-right: px2rem(68); -} - -/* One third column layout that switches to full width at the small desktop breakpoint (990px) instead of mobile. */ -.nhsuk-grid-column-one-third-small-desktop { - @extend .nhsuk-grid-column-one-third; - width: 33.3333333333% !important; - - @media (max-width: px2rem(990)) { - width: 100% !important; - } -} - - -/* Tweaks to styling for single card view. */ -@media(min-width: 768px) and (max-width: 990px) { - .nhsuk-card-group .nhsuk-grid-column-one-third-small-desktop { - max-width: 600px !important; - } - - .nhsuk-card-group--centred { - justify-content: center !important; - } -} - -.nhsuk-card-banner-container { - padding-bottom: 42.86%; - position: relative; -} - -.nhsuk-card-banner { - height: 100%; - object-fit: cover; - object-position: left; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -.nhsuk-card-banner-empty { - background-color: $nhsuk-pale-blue-color; - border-bottom: 1px solid #d8dde0; -} - -.nhsuk-error-message.error-message--margin-bottom-1 { - margin-bottom: nhsuk-spacing(1); -} - -.nhsuk-u-margin-bottom-2point5 { - margin-bottom: 12px; - - @media(max-width: 641px) { - margin-bottom: 10px; - } -} - .word-break__break-word { word-break: break-word; } @@ -203,12 +52,6 @@ justify-content: space-between; } -.nhsuk-button--no-shrink { - white-space: nowrap; - margin-top: auto !important; - margin-bottom: auto !important; -} - .modal-footer--buttons { justify-content: space-between !important; padding-left: 16px !important; @@ -217,10 +60,11 @@ margin-top: auto !important; margin-bottom: auto !important; } + .validation-summary-valid { display: none; } .field-validation-valid { display: none !important; -} \ No newline at end of file +} diff --git a/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/layout.scss b/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/nhsuk-overrides.scss similarity index 66% rename from Auth/LearningHub.Nhs.Auth/Styles/nhsuk/layout.scss rename to Auth/LearningHub.Nhs.Auth/Styles/nhsuk/nhsuk-overrides.scss index 50b3c2b..a048c03 100644 --- a/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/layout.scss +++ b/Auth/LearningHub.Nhs.Auth/Styles/nhsuk/nhsuk-overrides.scss @@ -1,34 +1,175 @@ @use "../abstracts/all" as *; @use "nhsuk" as *; -.nhsuk-header { - padding: 0 px2rem(32); +// Overrides due to +// - specific element updates (listed first) +// - Highly customised header +// - Beta banner +// - Footer padding update +// +// Header customisation not needed with current frontend package +// +// - FGC 31/07/25 + +.nhsuk-u-font-style-italic { + font-style: italic; } -.nhsuk-width-container.app-width-container { - max-width: px2rem(1208); - margin: 0 auto; - padding-left: px2rem(32); - padding-right: px2rem(32); +.nhsuk-button--red { + background-color: $nhsuk-red !important; + + &:hover { + background-color: $nhsuk-red-hover !important; + border-color: $nhsuk-red-hover !important; + } } -.nhsuk-header .nhsuk-width-container.app-width-container { - max-width: px2rem(1144); - margin: 0 auto; +.nhsuk-button--beta-login { + background-color: $nhsuk-blue; + box-shadow: 0 4px 0 #002f5c; } -.nhsuk-width-container.app-width-container.beta-banner { - padding: px2rem(8) px2rem(32); - max-width: px2rem(1208); +.nhsuk-button--beta-login:hover { + background-color: $nhsuk-btn-blue-hover; +} + +// By default, the text on reverse (white) buttons turns white once clicked, rendering them invisible. +.nhsuk-button--reverse:visited { + color: $nhsuk-black +} + +.nhsuk-back-link { + padding: px2rem(20) 0; + margin-bottom: 0; +} + +.nhsuk-radios__divider { + text-align: left; + width: unset; +} + +.nhsuk-radios__item label { + font-family: $font-stack; +} + +/* Conditional radio buttons - Note: The nhsuk-radios__conditional element needs to be a SIBLING of the radio button input element + otherwise the CSS selector won't work. See Views/Bookmark/Move.cshtml for a usage example. + The NHSUK component (nhsuk-radios__conditional) requires JavaScript to work. These tweaks allow it to work without. +*/ +.nhsuk-radios__conditional { + display: none; + margin-left: -22px; + margin-top: 8px; +} + +.nhsuk-radios__input:checked ~ .nhsuk-radios__conditional { + display: block !important; +} + +/* jquery unbobtrusive validation style over */ +.nhsuk-error-summary__list li { + color: $nhsuk-red; +} + +.nhsuk-form-group.input-validation-error { + @extend .nhsuk-form-group--error; +} + +.nhsuk-input.input-validation-error { + @extend .nhsuk-input--error +} + +.nhsuk-input:focus { + border: 2px solid #212b32; + box-shadow: inset 0 0 0 2px; + outline: 4px solid #ffeb3b; /* 1 */ + outline-offset: 0; +} + +.nhsuk-bg-light-blue { + background-color: $nhsuk-light-blue-color; +} + +.nhsuk-bg-pale-blue { + background-color: $nhsuk-pale-blue-color; +} + +.nhsuk-bg-white { + background-color: $color_nhsuk-white; +} + +.nhsuk-width-container.search-width-container { + max-width: px2rem(752); margin: 0 auto; + padding-left: px2rem(68); + padding-right: px2rem(68); } -.nhsuk-header .nhsuk-header__container::after { - content: none; +/* One third column layout that switches to full width at the small desktop breakpoint (990px) instead of mobile. */ +.nhsuk-grid-column-one-third-small-desktop { + @extend .nhsuk-grid-column-one-third; + width: 33.3333333333% !important; + + @media (max-width: px2rem(990)) { + width: 100% !important; + } } -.nhsuk-header__navigation.app-width-container { - max-width: px2rem(1144); +/* Tweaks to styling for single card view. */ +@media(min-width: 768px) and (max-width: 990px) { + .nhsuk-card-group .nhsuk-grid-column-one-third-small-desktop { + max-width: 600px !important; + } + + .nhsuk-card-group--centred { + justify-content: center !important; + } +} + +.nhsuk-card-banner-container { + padding-bottom: 42.86%; + position: relative; +} + +.nhsuk-card-banner { + height: 100%; + object-fit: cover; + object-position: left; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +.nhsuk-card-banner-empty { + background-color: $nhsuk-pale-blue-color; + border-bottom: 1px solid #d8dde0; +} + +.nhsuk-error-message.error-message--margin-bottom-1 { + margin-bottom: nhsuk-spacing(1); +} + +.nhsuk-u-margin-bottom-2point5 { + margin-bottom: 12px; + + @media(max-width: 641px) { + margin-bottom: 10px; + } +} + +.nhsuk-button--no-shrink { + white-space: nowrap; + margin-top: auto !important; + margin-bottom: auto !important; +} + +.nhsuk-width-container.app-width-container { + max-width: px2rem(1208); + margin: 0 auto; + padding-left: px2rem(32); + padding-right: px2rem(32); } .app-width-container--full { @@ -40,6 +181,27 @@ padding: 0 } +// +// Header updates start here +// + +.nhsuk-header { + padding: 0 px2rem(32); +} + +.nhsuk-header .nhsuk-width-container.app-width-container { + max-width: px2rem(1144); + margin: 0 auto; +} + +.nhsuk-header .nhsuk-header__container::after { + content: none; +} + +.nhsuk-header__navigation.app-width-container { + max-width: px2rem(1144); +} + .nhsuk-header__container.app-width-container { display: flex; justify-content: space-between; @@ -58,8 +220,8 @@ flex: 1 0 0; } -.nhsuk-header__logo .nhsuk-header__link--service { - display:inline-flex; +.nhsuk-header__logo .nhsuk-header__link--service { + display: inline-flex; } .nhsuk-header__service-name { @@ -90,7 +252,7 @@ height: px2rem(18); text-align: center; border-radius: px2rem(9); - padding:px2rem(1) px2rem(3) 0; + padding: px2rem(1) px2rem(3) 0; } .nhsuk-header__menu { @@ -107,6 +269,47 @@ color: #fff; } +#header-dropdown-menu-control { + opacity: 0; + position: absolute; +} + +#header-dropdown-menu-control:checked ~ .nhsuk-header__navigation:not(.js-show) { + display: block +} + +#header-mobile-search-control { + display: none; +} + +.nhsuk-header__break { + display: none; +} + +.nhsuk-header__mobile-only-nav { + display: none; +} + +.nhsuk-header__mobile-break { + display: none; +} + +.nhsuk-header__navigation-item--current { + a { + font-weight: bold; + } +} + +.nhsuk-width-container.app-width-container.beta-banner { + padding: px2rem(8) px2rem(32); + max-width: px2rem(1208); + margin: 0 auto; +} + +// +// Beta banner updates +// + .beta-banner { background-color: $color_nhsuk-grey-5; color: $nhsuk-text-color; @@ -118,7 +321,7 @@ } .beta-banner + div { - border-top:1px solid $color_nhsuk-grey-3; + border-top: 1px solid $color_nhsuk-grey-3; } .beta-banner__beta-box { @@ -137,48 +340,28 @@ font-size: px2rem(16); } +// +// Footer updates +// + .nhsuk-footer { padding: px2rem(48) 0; } - -#header-dropdown-menu-control { - opacity: 0; - position: absolute; -} - -#header-dropdown-menu-control:checked ~ .nhsuk-header__navigation:not(.js-show) { - display: block -} - -#header-mobile-search-control { - display: none; -} - -.nhsuk-header__break { - display: none; -} - -.nhsuk-header__mobile-only-nav { - display: none; -} - -.nhsuk-header__mobile-break { - display: none; -} - -.nhsuk-header__navigation-item--current { - a { - font-weight: bold; - } -} .nhsuk-footer__copyright { float: left; text-align: left; } + +// +// Responsive updates +// + /* large desktop */ @media (min-width: px2rem(990)) { + // entirely headers + .nhsuk-header__navigation-item--current a { border-bottom: 4px solid $nhsuk-grey-lighter; font-weight: normal; @@ -196,6 +379,8 @@ /* small desktop */ @media (max-width: px2rem(989)) { + // entirely headers + .nhsuk-header__container { flex-wrap: wrap; } @@ -261,7 +446,7 @@ text-align: center; margin: 0; right: 0; - font-weight:600; + font-weight: 600; } .nhsuk-header__search-form { @@ -286,7 +471,7 @@ background: $nhsuk-error-color; color: $nhsuk-white; min-width: px2rem(18); - width:fit-content; + width: fit-content; height: px2rem(18); text-align: center; border-radius: px2rem(9); @@ -326,12 +511,14 @@ /* mobile */ @media (max-width: px2rem(640)) { + //entirely headers + .nhsuk-header__not-mobile { display: none; } .nhsuk-header__logo { - max-width:none; + max-width: none; } .nhsuk-header__mobile-only-nav { @@ -391,7 +578,7 @@ } .nhsuk-header__search .nhsuk-search__submit { - padding-top:nhsuk-spacing(1); + padding-top: nhsuk-spacing(1); } .nhsuk-header__menu { @@ -419,4 +606,4 @@ .nhsuk-width-container.nhsuk-header__container.app-width-container { padding-bottom: 0; } -} \ No newline at end of file +} diff --git a/Auth/LearningHub.Nhs.Auth/Views/Shared/LearningHub/_Layout.cshtml b/Auth/LearningHub.Nhs.Auth/Views/Shared/LearningHub/_Layout.cshtml index 880d880..ce37bda 100644 --- a/Auth/LearningHub.Nhs.Auth/Views/Shared/LearningHub/_Layout.cshtml +++ b/Auth/LearningHub.Nhs.Auth/Views/Shared/LearningHub/_Layout.cshtml @@ -20,7 +20,7 @@ - + diff --git a/Auth/LearningHub.Nhs.Auth/Views/Shared/_SsoLayout.cshtml b/Auth/LearningHub.Nhs.Auth/Views/Shared/_SsoLayout.cshtml index 513a6fd..559ee2a 100644 --- a/Auth/LearningHub.Nhs.Auth/Views/Shared/_SsoLayout.cshtml +++ b/Auth/LearningHub.Nhs.Auth/Views/Shared/_SsoLayout.cshtml @@ -14,7 +14,7 @@ @ViewData["Title"] - Learning Hub Authentication - + diff --git a/Auth/LearningHub.Nhs.Auth/appsettings.json b/Auth/LearningHub.Nhs.Auth/appsettings.json index f4daca9..59273cd 100644 --- a/Auth/LearningHub.Nhs.Auth/appsettings.json +++ b/Auth/LearningHub.Nhs.Auth/appsettings.json @@ -66,145 +66,203 @@ }, "AuthClientIdentityKey": "", "AuthTimeout": 20, - "AuthClients": { - "learninghubadmin": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "" ], - "RedirectUris": [ "" ], - "PostLogoutUris": [ "" ], - "AllowedScopes": [ "", "", "", "", "" ], - "BackChannelLogoutSessionRequired": false, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": false, - "RequireConsent": false, - "RequirePkce": false, - "AllowOfflineAccess": false - }, - "learninghubwebclient": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "" ], - "RedirectUris": [ "" ], - "PostLogoutUris": [ "" ], - "AllowedScopes": [ "", "", "", "", "" ], - "BackChannelLogoutSessionRequired": false, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": false, - "RequireConsent": false, - "RequirePkce": false, - "AllowOfflineAccess": false - }, - "migrationTool": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "", "" ], - "RedirectUris": [], - "PostLogoutUris": [], - "AllowedScopes": [ "", "", "", "" ], - "BackChannelLogoutSessionRequired": false, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": false, - "RequireConsent": false, - "RequirePkce": false, - "AllowOfflineAccess": false - }, - "learninghubwebclient_local": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "" ], - "RedirectUris": [ "" ], - "PostLogoutUris": [ "" ], - "AllowedScopes": [ "", "", "", "", "" ], - "BackChannelLogoutSessionRequired": false, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": false, - "RequireConsent": false, - "RequirePkce": false, - "AllowOfflineAccess": false - }, - "learninghubadmin_local": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "" ], - "RedirectUris": [ "" ], - "PostLogoutUris": [ "" ], - "AllowedScopes": [ "", "", "", "", "" ], - "BackChannelLogoutSessionRequired": false, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": false, - "RequireConsent": false, - "RequirePkce": false, - "AllowOfflineAccess": false - }, - "userprofileclient": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "" ], - "RedirectUris": [ "" ], - "PostLogoutUris": [ "" ], - "AllowedScopes": [ "", "", "", "", "", "" ], - "BackChannelLogoutSessionRequired": true, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": true, - "RequireConsent": false, - "RequirePkce": true, - "AllowOfflineAccess": true - }, - "learninghubopenapi": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "" ], - "RedirectUris": [ "" ], - "PostLogoutUris": [ "" ], - "AllowedScopes": [ "", "", "", "", "" ], - "BackChannelLogoutSessionRequired": true, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": true, - "RequireConsent": false, - "RequirePkce": true, - "AllowOfflineAccess": true - }, - "digitallearningsolutions": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "" ], - "RedirectUris": [ "" ], - "PostLogoutUris": [ "" ], - "AllowedScopes": [ "", "", "", "", "" ], - "BackChannelLogoutSessionRequired": true, - "BackChannelLogoutUri": "", - "UpdateAccessTokenClaimsOnRefresh": true, - "RequireConsent": false, - "RequirePkce": true, - "AllowOfflineAccess": true - }, - "moodle": { - "BaseUrl": "", - "ClientName": "", - "ClientSecret": "", - "AllowedGrantTypes": [ "authorization_code" ], - "RedirectUris": [ "/auth/oidc/" ], - "PostLogoutUris": [ "/login/logout.php" ], - "AllowedScopes": [ "openid", "profile", "learninghubapi", "userapi", "roles", "learningcredentialsapi" ], - "BackChannelLogoutSessionRequired": true, - "BackChannelLogoutUri": "/login/logout.php", - "FrontChannelLogoutSessionRequired": true, - "FrontChannelLogoutUri": "/login/logout.php", - "UpdateAccessTokenClaimsOnRefresh": true, - "RequireConsent": false, - "RequirePkce": false, - "AllowOfflineAccess": true - } + "AuthClients": { + "learninghubadmin": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": false, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": false, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": false + }, + "learninghubwebclient": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": false, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": false, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": false + }, + "migrationTool": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "", "" ], + "RedirectUris": [], + "PostLogoutUris": [], + "AllowedScopes": [ "", "", "", "" ], + "BackChannelLogoutSessionRequired": false, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": false, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": false }, + "learninghubwebclient_local": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": false, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": false, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": false + }, + "learninghubadmin_local": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": false, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": false, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": false + }, + "userprofileclient": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": true, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": true, + "RequireConsent": false, + "RequirePkce": true, + "AllowOfflineAccess": true + }, + "learninghubopenapi": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": true, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": true, + "RequireConsent": false, + "RequirePkce": true, + "AllowOfflineAccess": true + }, + "digitallearningsolutions": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "" ], + "RedirectUris": [ "" ], + "PostLogoutUris": [ "" ], + "AllowedScopes": [ "", "", "", "", "" ], + "BackChannelLogoutSessionRequired": true, + "BackChannelLogoutUri": "", + "UpdateAccessTokenClaimsOnRefresh": true, + "RequireConsent": false, + "RequirePkce": true, + "AllowOfflineAccess": true + }, + "moodle": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "authorization_code" ], + "RedirectUris": [ "/auth/oidc/" ], + "PostLogoutUris": [ "/login/logout.php" ], + "AllowedScopes": [ "openid", "profile", "learninghubapi", "userapi", "roles", "learningcredentialsapi" ], + "BackChannelLogoutSessionRequired": true, + "BackChannelLogoutUri": "/login/logout.php", + "FrontChannelLogoutSessionRequired": true, + "FrontChannelLogoutUri": "/login/logout.php", + "UpdateAccessTokenClaimsOnRefresh": true, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": true + }, + "moodlepgvle": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "authorization_code" ], + "RedirectUris": [ "/auth/oidc/" ], + "PostLogoutUris": [ "/login/logout.php" ], + "AllowedScopes": [ "openid", "profile", "learninghubapi", "userapi", "roles", "learningcredentialsapi" ], + "BackChannelLogoutSessionRequired": true, + "BackChannelLogoutUri": "/login/logout.php", + "FrontChannelLogoutSessionRequired": true, + "FrontChannelLogoutUri": "/login/logout.php", + "UpdateAccessTokenClaimsOnRefresh": true, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": true + }, + "moodlemooc": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ "authorization_code" ], + "RedirectUris": [ "/auth/oidc/" ], + "PostLogoutUris": [ "/login/logout.php" ], + "AllowedScopes": [ "openid", "profile", "learninghubapi", "userapi", "roles", "learningcredentialsapi" ], + "BackChannelLogoutSessionRequired": true, + "BackChannelLogoutUri": "/login/logout.php", + "FrontChannelLogoutSessionRequired": true, + "FrontChannelLogoutUri": "/login/logout.php", + "UpdateAccessTokenClaimsOnRefresh": true, + "RequireConsent": false, + "RequirePkce": false, + "AllowOfflineAccess": true + }, + "moodleinstancebridge": { + "BaseUrl": "", + "ClientName": "", + "ClientSecret": "", + "AllowedGrantTypes": [ + "authorization_code" + ], + "RedirectUris": [ + "" + ], + "AllowedCorsOrigins": [ + "" + ], + "AllowedScopes": [ + "openid", + "profile", + "learninghubapi", + "userapi", + "roles" + ], + "RequirePkce": true, + "RequireConsent": false, + "AllowOfflineAccess": true + } + }, "IdsClients": { "eLfH": { "ClientDescription": "e-Learning for Healthcare Hub", diff --git a/Auth/LearningHub.Nhs.Auth/package-lock.json b/Auth/LearningHub.Nhs.Auth/package-lock.json index b0fd361..7111190 100644 --- a/Auth/LearningHub.Nhs.Auth/package-lock.json +++ b/Auth/LearningHub.Nhs.Auth/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "babel-polyfill": "^6.26.0", "concurrently": "^7.2.0", - "core-js": "^3.42.0", + "core-js": "^3.43.0", "nhsuk-frontend": "^7.0.0", "node": "^22" }, @@ -25,7 +25,7 @@ "cross-env": "^7.0.3", "css-loader": "^5.2.4", "file-loader": "^6.2.0", - "sass": "^1.89.0", + "sass": "^1.89.2", "sass-loader": "^11.0.1", "style-loader": "^2.0.0", "ts-loader": "^9.5.2", @@ -3515,9 +3515,9 @@ "license": "MIT" }, "node_modules/core-js": { - "version": "3.42.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.42.0.tgz", - "integrity": "sha512-Sz4PP4ZA+Rq4II21qkNqOEDTDrCvcANId3xpIgB34NDkWc3UduWj2dqEtN9yZIq8Dk3HyPI33x9sqqU5C8sr0g==", + "version": "3.43.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.43.0.tgz", + "integrity": "sha512-N6wEbTTZSYOY2rYAn85CuvWWkCK6QweMn7/4Nr3w+gDBeBhk/x4EJeY6FPo4QzDoJZxVTv8U7CMvgWk6pOHHqA==", "hasInstallScript": true, "license": "MIT", "funding": { @@ -5997,9 +5997,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.89.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.89.0.tgz", - "integrity": "sha512-ld+kQU8YTdGNjOLfRWBzewJpU5cwEv/h5yyqlSeJcj6Yh8U4TDA9UA5FPicqDz/xgRPWRSYIQNiFks21TbA9KQ==", + "version": "1.89.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.89.2.tgz", + "integrity": "sha512-xCmtksBKd/jdJ9Bt9p7nPKiuqrlBMBuuGkQlkhZjjQk3Ty48lv93k5Dq6OPkKt4XwxDJ7tvlfrTa1MPA9bf+QA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/Auth/LearningHub.Nhs.Auth/package.json b/Auth/LearningHub.Nhs.Auth/package.json index 774c644..ae20178 100644 --- a/Auth/LearningHub.Nhs.Auth/package.json +++ b/Auth/LearningHub.Nhs.Auth/package.json @@ -21,7 +21,7 @@ "dependencies": { "babel-polyfill": "^6.26.0", "concurrently": "^7.2.0", - "core-js": "^3.42.0", + "core-js": "^3.43.0", "nhsuk-frontend": "^7.0.0", "node": "^22" }, @@ -35,7 +35,7 @@ "cross-env": "^7.0.3", "css-loader": "^5.2.4", "file-loader": "^6.2.0", - "sass": "^1.89.0", + "sass": "^1.89.2", "sass-loader": "^11.0.1", "style-loader": "^2.0.0", "ts-loader": "^9.5.2", diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..305229f --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,49 @@ + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj b/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj index e870b9b..d3f232b 100644 --- a/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj +++ b/LearningHub.Nhs.UserApi.Repository.Interface/LearningHub.Nhs.UserApi.Repository.Interface.csproj @@ -8,8 +8,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj b/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj index b61cebb..b643a23 100644 --- a/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj +++ b/LearningHub.Nhs.UserApi.Repository/LearningHub.Nhs.UserApi.Repository.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/LearningHub.Nhs.UserApi.Repository/UserRoleUpgradeRepository.cs b/LearningHub.Nhs.UserApi.Repository/UserRoleUpgradeRepository.cs index 920c996..fe5453e 100644 --- a/LearningHub.Nhs.UserApi.Repository/UserRoleUpgradeRepository.cs +++ b/LearningHub.Nhs.UserApi.Repository/UserRoleUpgradeRepository.cs @@ -37,7 +37,7 @@ public IQueryable GetByUserIdAsync(int userId) public IQueryable GetByEmailAddressAsync(string emailAddress, int userId) { return this.DbContext.Set() - .Where(n => n.UserId == userId && n.EmailAddress == emailAddress && n.Deleted == false && n.UpgradeDate == null) + .Where(n => n.UserId == userId && n.EmailAddress.ToLower() == emailAddress.ToLower() && n.Deleted == false && n.UpgradeDate == null) .AsNoTracking(); } } diff --git a/LearningHub.Nhs.UserApi.Services.Interface/ICountryService.cs b/LearningHub.Nhs.UserApi.Services.Interface/ICountryService.cs index 8b950f7..9da2394 100644 --- a/LearningHub.Nhs.UserApi.Services.Interface/ICountryService.cs +++ b/LearningHub.Nhs.UserApi.Services.Interface/ICountryService.cs @@ -39,5 +39,21 @@ public interface ICountryService /// The . /// Task> GetFilteredAsync(string filter); + + /// + /// The get all. + /// + /// + /// The . + /// + Task> GetAllUKCountries(); + + /// + /// The get all. + /// + /// + /// The . + /// + Task> GetAllNonUKCountries(); } } \ No newline at end of file diff --git a/LearningHub.Nhs.UserApi.Services.Interface/IElfhUserService.cs b/LearningHub.Nhs.UserApi.Services.Interface/IElfhUserService.cs index 9f77a64..ae510eb 100644 --- a/LearningHub.Nhs.UserApi.Services.Interface/IElfhUserService.cs +++ b/LearningHub.Nhs.UserApi.Services.Interface/IElfhUserService.cs @@ -520,5 +520,13 @@ public interface IElfhUserService /// currentUserId. /// The . Task CheckSamePrimaryemailIsPendingToValidate(string secondaryEmail, int currentUserId); + + /// + /// Update MyAccount Personal Details. + /// + /// personalDetailsViewModel. + /// currentUserId. + /// The . + Task UpdateMyAccountPersonalDetails(PersonalDetailsViewModel personalDetailsViewModel, int currentUserId); } } \ No newline at end of file diff --git a/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj b/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj index e870b9b..d3f232b 100644 --- a/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj +++ b/LearningHub.Nhs.UserApi.Services.Interface/LearningHub.Nhs.UserAPI.Services.Interface.csproj @@ -8,8 +8,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj b/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj index 45cd747..561a9d5 100644 --- a/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj +++ b/LearningHub.Nhs.UserApi.Services.UnitTests/LearningHub.Nhs.UserApi.Services.UnitTests.csproj @@ -10,10 +10,10 @@ - + - + diff --git a/LearningHub.Nhs.UserApi.Services/CountryService.cs b/LearningHub.Nhs.UserApi.Services/CountryService.cs index 5e2eb60..27d290b 100644 --- a/LearningHub.Nhs.UserApi.Services/CountryService.cs +++ b/LearningHub.Nhs.UserApi.Services/CountryService.cs @@ -79,5 +79,35 @@ public async Task> GetFilteredAsync(string filter) return countryList; } + + /// + /// Get All UK Countries. + /// + /// List of countries. + public async Task> GetAllUKCountries() + { + var items = this.countryRepository.GetAll() + .Where(c => c.Deleted == false && c.Numeric == "826") + .OrderBy(r => r.DisplayOrder); + + var countryList = await this.mapper.ProjectTo(items).ToListWithNoLockAsync(); + + return countryList; + } + + /// + /// Get All Non UK Countries. + /// + /// List of countries. + public async Task> GetAllNonUKCountries() + { + var items = this.countryRepository.GetAll() + .Where(c => c.Deleted == false && c.Numeric != "826") + .OrderBy(r => r.DisplayOrder); + + var countryList = await this.mapper.ProjectTo(items).ToListWithNoLockAsync(); + + return countryList; + } } } diff --git a/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs b/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs index 0de671e..b3fee9e 100644 --- a/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs +++ b/LearningHub.Nhs.UserApi.Services/ElfhUserService.cs @@ -237,13 +237,15 @@ public async Task RecordSuccessfulSigninAsync(int id, CancellationToken token = { var user = await this.elfhUserRepository.GetByIdAsync(id); - user.LoginTimes++; - user.PasswordLifeCounter = 0; - user.SecurityLifeCounter = 0; + if (user.PasswordLifeCounter != 0 || user.SecurityLifeCounter != 0) + { + user.PasswordLifeCounter = 0; + user.SecurityLifeCounter = 0; - await this.elfhUserRepository.UpdateAsync(id, user); + await this.elfhUserRepository.UpdateAsync(id, user); - await this.InvalidateElfhUserCacheAsync(user.Id, user.UserName, token); + await this.InvalidateElfhUserCacheAsync(user.Id, user.UserName, token); + } } /// @@ -251,7 +253,6 @@ public async Task RecordUnsuccessfulSigninAsync(int id, CancellationToken token { var user = await this.elfhUserRepository.GetByIdAsync(id); - user.LoginTimes++; user.PasswordLifeCounter++; await this.elfhUserRepository.UpdateAsync(id, user); @@ -1008,14 +1009,29 @@ public async Task ValidateUserRoleUpgrade(string currentPrimaryEmail, stri /// public async Task CheckSamePrimaryemailIsPendingToValidate(string secondaryEmail, int currentUserId) { - var userRoleUpgrades = this.userRoleUpgradeRepository.GetByEmailAddressAsync(secondaryEmail, currentUserId); + var userRoleUpgrades = this.userRoleUpgradeRepository.GetByEmailAddressAsync(secondaryEmail, currentUserId); - if (userRoleUpgrades.Count() > 0) - { + if (userRoleUpgrades.Count() > 0) + { return true; - } + } + + return false; + } - return false; + /// + /// Update MyAccount PersonalDetails. + /// + /// personalDetailsViewModel. + /// currentUserId. + /// The . + public async Task UpdateMyAccountPersonalDetails(PersonalDetailsViewModel personalDetailsViewModel, int currentUserId) + { + User user = await this.elfhUserRepository.GetByIdAsync(personalDetailsViewModel.UserId); + user.PreferredName = personalDetailsViewModel.PreferredName; + user.AltEmailAddress = personalDetailsViewModel.SecondaryEmailAddress; + + await this.elfhUserRepository.UpdateAsync(currentUserId, user); } private async Task ValidateAsync(CreateOpenAthensLinkToLhUser newUserDetails) diff --git a/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj b/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj index f91a29c..b70eb72 100644 --- a/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj +++ b/LearningHub.Nhs.UserApi.Services/LearningHub.Nhs.UserApi.Services.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj b/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj index a671f54..bb7513e 100644 --- a/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj +++ b/LearningHub.Nhs.UserApi.Shared/LearningHub.Nhs.UserApi.Shared.csproj @@ -8,8 +8,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj b/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj index 46cadfa..966df90 100644 --- a/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj +++ b/LearningHub.Nhs.UserApi.UnitTests/LearningHub.Nhs.UserApi.UnitTests.csproj @@ -10,8 +10,8 @@ - - + + diff --git a/LearningHub.Nhs.UserApi.sln b/LearningHub.Nhs.UserApi.sln index adb65c7..77a9165 100644 --- a/LearningHub.Nhs.UserApi.sln +++ b/LearningHub.Nhs.UserApi.sln @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{683CA47A-9041-4CB9-B436-CD20BD40EB34}" ProjectSection(SolutionItems) = preProject Directory.Build.props = Directory.Build.props + Directory.Packages.props = Directory.Packages.props StyleCop.json = StyleCop.json StyleCop.ruleset = StyleCop.ruleset EndProjectSection diff --git a/LearningHub.Nhs.UserApi/Controllers/CountryController.cs b/LearningHub.Nhs.UserApi/Controllers/CountryController.cs index e2430d5..8af9d92 100644 --- a/LearningHub.Nhs.UserApi/Controllers/CountryController.cs +++ b/LearningHub.Nhs.UserApi/Controllers/CountryController.cs @@ -83,5 +83,33 @@ public async Task GetFiltered(string filter) var list = await this.countryService.GetFilteredAsync(filter); return this.Ok(list); } + + /// + /// Get a list of Uk Country records. + /// + /// + /// The . + /// + [HttpGet] + [Route("GetAllUKCountries")] + public async Task GetAllUKCountries() + { + var list = await this.countryService.GetAllUKCountries(); + return this.Ok(list); + } + + /// + /// Get a list of non Uk Country records. + /// + /// + /// The . + /// + [HttpGet] + [Route("GetAllNonUKCountries")] + public async Task GetAllNonUKCountries() + { + var list = await this.countryService.GetAllNonUKCountries(); + return this.Ok(list); + } } } \ No newline at end of file diff --git a/LearningHub.Nhs.UserApi/Controllers/ElfhUserController.cs b/LearningHub.Nhs.UserApi/Controllers/ElfhUserController.cs index e2441d1..7532c80 100644 --- a/LearningHub.Nhs.UserApi/Controllers/ElfhUserController.cs +++ b/LearningHub.Nhs.UserApi/Controllers/ElfhUserController.cs @@ -923,5 +923,18 @@ public async Task UpgradeAsFullAccessUser(int userId, string emai var result = await this.securityService.UpgradeAsFullAccessUser(userId, email); return this.Ok(result); } + + /// + /// Update MyAccount Personal Details. + /// + /// personalDetailsViewModel. + /// The . + [HttpPut] + [Route("UpdateMyAccountPersonalDetails")] + public async Task UpdateMyAccountPersonalDetails([FromBody] PersonalDetailsViewModel personalDetailsViewModel) + { + await this.elfhUserService.UpdateMyAccountPersonalDetails(personalDetailsViewModel, this.CurrentUserId); + return this.Ok(); + } } } \ No newline at end of file diff --git a/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj b/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj index f7ebf4a..cfb5230 100644 --- a/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj +++ b/LearningHub.Nhs.UserApi/LearningHub.Nhs.UserApi.csproj @@ -23,10 +23,10 @@ - + - + diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..4b5a055 --- /dev/null +++ b/nuget.config @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file