Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public static class ConfigurationExtensions
private const string LearningHubOpenApiKey = "LearningHubOpenAPIKey";
private const string LearningHubOpenApiBaseUrl = "LearningHubOpenAPIBaseUrl";
private const string PricingPageEnabled = "FeatureManagement:PricingPage";

private const string ShowDlsLoginButton = "FeatureManagement:ShowDlsLoginButton";

private const string LearningHubAuthBaseUrl = "BaseUrl";
private const string LearningHubAuthLoginEndpoint = "LoginEndpoint";
private const string LearningHubAuthLinkingEndpoint = "LinkingEndpoint";
Expand Down Expand Up @@ -118,7 +119,11 @@ public static bool IsPricingPageEnabled(this IConfiguration config)
bool.TryParse(config[PricingPageEnabled], out bool isEnabled);
return isEnabled;
}

public static bool IsDlsLoginButtonShown(this IConfiguration config)
{
bool.TryParse(config[ShowDlsLoginButton], out bool isEnabled);
return isEnabled;
}
public static int GetLearningHubSsoHashTolerance(this IConfiguration config)
{
int.TryParse(config[$"{LearningHubSsoSectionKey}:{LearningHubSsoToleranceKey}"], out int ssoHashTolerance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@
}
else
{
@if (Configuration.IsDlsLoginButtonShown())
{
<li class="nhsuk-header__navigation-item @Html.GetSelectedCssClassIfTabSelected(NavMenuTab.LogIn)">
<a class="nhsuk-header__navigation-link" asp-controller="Login" asp-action="Index">
Log in
</a>
</li>
}
<li class="nhsuk-header__navigation-item @Html.GetSelectedCssClassIfTabSelected(NavMenuTab.Register)">
<a class="nhsuk-header__navigation-link" asp-controller="Register" asp-action="Start">
Register
Expand Down
3 changes: 2 additions & 1 deletion DigitalLearningSolutions.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"PricingPage": true,
"ShowSelfAssessmentProgressButtons": false,
"LoginWithLearningHub": true,
"TableauSelfAssessmentDashboards": true
"TableauSelfAssessmentDashboards": true,
"ShowDlsLoginButton": false
},
"LearningHubOpenAPIBaseUrl": "https://uks-learninghubnhsuk-openapi-test.azurewebsites.net",
"LearningHubOpenAPIKey": "",
Expand Down
Loading