mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-10-05 07:39:39 +00:00
Add proper ban page when logging in (#773)
* Add proper ban page upon logging in * Remove two extra line break tags that don't need to be there * Fix timestamp formatting * Properly display timestamps in correct timezone * Fix formatting issues with ban page * Remove extra parenthesis which would be rendered on-page * Add to redirect middleware to prevent navigating to other pages * Small nitpick, renaming UserBannedPage to BannedUserPage * Resolve nitpicks from reviewers * Remove un-necessary log message in LoginForm * Fix ban reason translatable string argument * Word choice nitpick ("Ban Created" -> "Ban Issued") * Final adjustments and nitpicks, visual and grammatical * Resolve requested changes from reviewers
This commit is contained in:
parent
c8c54d78de
commit
21dbdff20a
11 changed files with 203 additions and 23 deletions
|
@ -59,6 +59,18 @@ public class UserRequiredRedirectMiddleware : MiddlewareDBContext
|
|||
return;
|
||||
}
|
||||
|
||||
if (user.IsBanned)
|
||||
{
|
||||
if (!pathContains(ctx, "/banned"))
|
||||
{
|
||||
ctx.Response.Redirect("/banned");
|
||||
return;
|
||||
}
|
||||
|
||||
await this.next(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.EmailAddress == null && ServerConfiguration.Instance.Mail.MailEnabled)
|
||||
{
|
||||
if (!pathContains(ctx, "/login/setEmail"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue