Browse Source

feat(users): password reconfirmation

master
he3als 5 months ago
parent
commit
8c6c9c3d3c
Signed by: he3als GPG Key ID: A0FC52EA5368ECF4
2 changed files with 12 additions and 1 deletions
  1. +11
    -0
      src/Actions/Users.cs
  2. +1
    -1
      src/amecs.csproj

+ 11
- 0
src/Actions/Users.cs View File

@ -250,6 +250,17 @@ namespace amecs.Actions
var password = new InputPrompt() { MaskInput = true, Text = "\r\nEnter password for new user, or press\r\nescape to quit: " }.Start();
if (password == null)
return false;
var passwordConfirmation = new InputPrompt() { MaskInput = true, Text = "\r\nRe-enter your password, or press\r\nescape to quit: " }.Start();
if (passwordConfirmation == null)
return false;
if (password != passwordConfirmation)
{
ConsoleTUI.OpenFrame.WriteLine("The password re-entered does not match your original password.");
Console.WriteLine();
continue;
}
try
{


+ 1
- 1
src/amecs.csproj View File

@ -5,6 +5,7 @@
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>amecs.ico</ApplicationIcon>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -39,7 +40,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32bit>false</Prefer32bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">


Loading…
Cancel
Save