-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require email and password change checkboxes.
Instead of locking accounts with temp mails we request them to change it! Added password change too cause why not.
- Loading branch information
1 parent
7056467
commit 6ac37e5
Showing
16 changed files
with
1,890 additions
and
15 deletions.
There are no files selected for viewing
1,698 changes: 1,698 additions & 0 deletions
1,698
SS14.Auth.Shared/Data/Migrations/20240625192927_email-pass-required.Designer.cs
Large diffs are not rendered by default.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
SS14.Auth.Shared/Data/Migrations/20240625192927_email-pass-required.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,37 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace SS14.Auth.Shared.Data.Migrations | ||
{ | ||
public partial class emailpassrequired : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.AddColumn<bool>( | ||
name: "RequireEmailChange", | ||
table: "AspNetUsers", | ||
type: "boolean", | ||
nullable: false, | ||
defaultValue: false); | ||
|
||
migrationBuilder.AddColumn<bool>( | ||
name: "RequirePasswordChange", | ||
table: "AspNetUsers", | ||
type: "boolean", | ||
nullable: false, | ||
defaultValue: false); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropColumn( | ||
name: "RequireEmailChange", | ||
table: "AspNetUsers"); | ||
|
||
migrationBuilder.DropColumn( | ||
name: "RequirePasswordChange", | ||
table: "AspNetUsers"); | ||
} | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
SS14.Web/Areas/Identity/Pages/Account/EmailChangeRequired.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,11 @@ | ||
@page | ||
@using SS14.Web.Areas.Identity.Pages.Account | ||
@model LockoutModel | ||
@{ | ||
ViewData["Title"] = "Email change required"; | ||
} | ||
|
||
<header> | ||
<h1 class="text-danger">@ViewData["Title"]</h1> | ||
<p class="text-danger">This account needs a new email to be set before you can use it again. Please change it below.</p> | ||
</header> |
13 changes: 13 additions & 0 deletions
13
SS14.Web/Areas/Identity/Pages/Account/EmailChangeRequired.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,13 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace SS14.Web.Areas.Identity.Pages.Account; | ||
|
||
[AllowAnonymous] | ||
public class ForcedEmailChangeModel : PageModel | ||
{ | ||
public void OnGet() | ||
{ | ||
|
||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
SS14.Web/Areas/Identity/Pages/Account/PasswordChangeRequired.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,11 @@ | ||
@page | ||
@using SS14.Web.Areas.Identity.Pages.Account | ||
@model LockoutModel | ||
@{ | ||
ViewData["Title"] = "Password change required"; | ||
} | ||
|
||
<header> | ||
<h1 class="text-danger">@ViewData["Title"]</h1> | ||
<p class="text-danger">This account needs a new password to be set before you can use it again. Please change it below.</p> | ||
</header> |
13 changes: 13 additions & 0 deletions
13
SS14.Web/Areas/Identity/Pages/Account/PasswordChangeRequired.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,13 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace SS14.Web.Areas.Identity.Pages.Account; | ||
|
||
[AllowAnonymous] | ||
public class ForcedPassChangeModel : PageModel | ||
{ | ||
public void OnGet() | ||
{ | ||
|
||
} | ||
} |
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