mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-30 04:32:27 +00:00
* Initial work for user settings page * Finish user setting and slot setting pages * Don't show slot upload date on home page and fix team pick redirection * Fix upload image button alignment on mobile * Fix image upload on iPhone * Remove unused css and add selected button color * Fix login email check and bump ChromeDriver to 105 * Remove duplicated code and allow users to leave fields empty * Add unpublish button on level settings and move settings button position * Don't show edit button on mini card * Self review bug fixes and users can no longer use an in-use email
70 lines
No EOL
2.6 KiB
Text
70 lines
No EOL
2.6 KiB
Text
@page "/authentication"
|
|
@using LBPUnion.ProjectLighthouse.PlayerData
|
|
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.ExternalAuth.AuthenticationPage
|
|
|
|
@{
|
|
Layout = "Layouts/BaseLayout";
|
|
Model.Title = "Authentication";
|
|
string timeZone = Model.GetTimeZone();
|
|
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(timeZone);
|
|
}
|
|
|
|
@if (Model.AuthenticationAttempts.Count == 0)
|
|
{
|
|
<p>You have no pending authentication attempts.</p>
|
|
}
|
|
else
|
|
{
|
|
<p>You have @Model.AuthenticationAttempts.Count authentication attempts pending.</p>
|
|
@if (Model.IpAddress != null)
|
|
{
|
|
<p>This device's IP address is <b>@(Model.IpAddress.ToString())</b>. If this matches with an authentication attempt below, then it's safe to assume the authentication attempt came from the same network as this device.</p>
|
|
}
|
|
}
|
|
|
|
@if (Model.User!.ApprovedIPAddress != null)
|
|
{
|
|
<a href="/authentication/revokeAutoApproval">
|
|
<button class="ui red button">
|
|
<i class="trash icon"></i>
|
|
<span>Revoke automatically approved IP Address (@Model.User!.ApprovedIPAddress)</span>
|
|
</button>
|
|
</a>
|
|
}
|
|
@if (Model.AuthenticationAttempts.Count > 1)
|
|
{
|
|
<a href="/authentication/denyAll">
|
|
<button class="ui red button">
|
|
<i class="x icon"></i>
|
|
<span>Deny all</span>
|
|
</button>
|
|
</a>
|
|
}
|
|
|
|
@foreach (AuthenticationAttempt authAttempt in Model.AuthenticationAttempts)
|
|
{
|
|
DateTimeOffset timestamp = TimeZoneInfo.ConvertTime(DateTimeOffset.FromUnixTimeSeconds(authAttempt.Timestamp), timeZoneInfo);
|
|
<div class="ui red segment">
|
|
<p>A <b>@authAttempt.Platform</b> authentication request was logged at <b>@timestamp.ToString("M/d/yyyy @ h:mm tt")</b> from the IP address <b>@authAttempt.IPAddress</b>.</p>
|
|
<div>
|
|
<a href="/authentication/autoApprove/@authAttempt.AuthenticationAttemptId">
|
|
<button class="ui small green button">
|
|
<i class="check icon"></i>
|
|
<span>Automatically approve every time</span>
|
|
</button>
|
|
</a>
|
|
<a href="/authentication/approve/@authAttempt.AuthenticationAttemptId">
|
|
<button class="ui small yellow button">
|
|
<i class="check icon"></i>
|
|
<span>Approve this time</span>
|
|
</button>
|
|
</a>
|
|
<a href="/authentication/deny/@authAttempt.AuthenticationAttemptId">
|
|
<button class="ui small red button">
|
|
<i class="x icon"></i>
|
|
<span>Deny</span>
|
|
</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
} |