То, что изменено на паре
This commit is contained in:
parent
329dcdfb84
commit
192d064273
@ -14,7 +14,7 @@ namespace PrecastConcretePlantDatabaseImplement
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-V0ON61E\SQLEXPRESS;Initial Catalog=PrecastConcretePlantDataBaseFullHard;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
optionsBuilder.UseSqlServer(@"Data Source=Maksim\SQLEXPRESS;Initial Catalog=PrecastConcretePlantDataBaseFullHard;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
@ -10,7 +10,12 @@ namespace PrecastConcretePlantShopApp
|
||||
|
||||
public static bool IsAccessAllowed { get; set; } = false;
|
||||
|
||||
public static string AccessPassword { get; private set; } = string.Empty;
|
||||
public static string AccessPassword = string.Empty;
|
||||
|
||||
public static void GetAccess(string password)
|
||||
{
|
||||
IsAccessAllowed = AccessPassword.Equals(password);
|
||||
}
|
||||
|
||||
public static void Connect(IConfiguration configuration)
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ namespace PrecastConcretePlantShopApp.Controllers
|
||||
{
|
||||
throw new Exception("Введите пароль");
|
||||
}
|
||||
APIClient.IsAccessAllowed = password.Equals(APIClient.AccessPassword);
|
||||
APIClient.GetAccess(password);
|
||||
if (APIClient.IsAccessAllowed is false)
|
||||
{
|
||||
throw new Exception("Неверный пароль");
|
||||
|
Loading…
Reference in New Issue
Block a user