-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reference DQT record to allow teachers with prohibitions to sign in
- Loading branch information
Showing
40 changed files
with
684 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/SignIn/Blocked.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@page "/sign-in/blocked" | ||
@inject IConfiguration Configuration | ||
@model TeacherIdentity.AuthServer.Pages.SignIn.BlockedModel | ||
@{ | ||
ViewBag.Title = $"You cannot {Model.ClientName}"; | ||
} | ||
|
||
<div class="govuk-panel app-panel--interruption" data-testid="landing-panel"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<h1 class="govuk-heading-l">@ViewBag.Title</h1> | ||
|
||
<p> | ||
Email <a href="mailto:@(Configuration["SupportEmail"])">@(Configuration["SupportEmail"])</a> to find out how to @Model.ClientName. | ||
</p> | ||
</div> | ||
</div> | ||
</div> |
26 changes: 26 additions & 0 deletions
26
dotnet-authserver/src/TeacherIdentity.AuthServer/Pages/SignIn/Blocked.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
using TeacherIdentity.AuthServer.Journeys; | ||
using TeacherIdentity.AuthServer.Oidc; | ||
using TeacherIdentity.AuthServer.State; | ||
|
||
namespace TeacherIdentity.AuthServer.Pages.SignIn; | ||
|
||
[CheckCanAccessStep(CoreSignInJourney.Steps.Blocked)] | ||
[AllowCompletedAuthenticationJourney] | ||
public class BlockedModel : PageModel | ||
{ | ||
private readonly ICurrentClientProvider _currentClientProvider; | ||
|
||
public BlockedModel(ICurrentClientProvider currentClientProvider) | ||
{ | ||
_currentClientProvider = currentClientProvider; | ||
} | ||
|
||
public string? ClientName { get; set; } | ||
|
||
public async Task OnGet() | ||
{ | ||
var client = await _currentClientProvider.GetCurrentClient(); | ||
ClientName = client!.DisplayName; | ||
} | ||
} |
Oops, something went wrong.