Neue Client Version ausgeliefert mit diversen Bugfixes (Rechte für KI angepasst, Prüfung von HPs beim Speichern, PIN aktiviert)

This commit is contained in:
2026-03-13 15:13:24 +01:00
parent d4300003bd
commit 9df422a01a
10 changed files with 217 additions and 59 deletions

View File

@@ -460,45 +460,43 @@ namespace BeWo.Service.ServiceImplementations
if (sha256 == "B2-FF-FF-CA-3E-DD-8F-8C-10-5A-05-C7-1F-EB-09-AF-3B-9B-DF-C7-B7-C2-6D-CC-34-56-17-DD-F3-28-B5-B1")
{
//Hier einkommentieren wenn PIN aktiviert werden soll
//Hier einkommentieren wenn PIN aktiviert werden soll
//if (!String.IsNullOrEmpty(pPIN) && pPIN.IndexOf('_') >= 0)
//{
// pin = pPIN.Substring(0, pPIN.IndexOf('_'));
// computerName = pPIN.Substring(pPIN.IndexOf('_') + 1);
//}
//var pins = DAOFactory.GenericDAO.GetAll<SupportPin>();
//var y = pins.Where(p => p.Pin.Equals(pin)).ToList();
if (!String.IsNullOrEmpty(pPIN) && pPIN.IndexOf('_') >= 0)
{
pin = pPIN.Substring(0, pPIN.IndexOf('_'));
computerName = pPIN.Substring(pPIN.IndexOf('_') + 1);
}
var pins = DAOFactory.GenericDAO.GetAll<SupportPin>();
var y = pins.Where(p => p.Pin.Equals(pin)).ToList();
//if (y.Count == 0)
//{
// result = UserValidationResult.IncorrectPin;
// valid = false;
//}
//else
//{
// supportPIN = y[0];
// if (supportPIN.IsUsed.Value ||
// supportPIN.ExpirationDate < DateTime.Now ||
// supportPIN.UsingDate != null)
// {
// if (supportPIN.IsUsed.HasValue && supportPIN.IsUsed.Value)
// result = UserValidationResult.PinAlreadyUsed;
// else if (supportPIN.ExpirationDate < DateTime.Now)
// result = UserValidationResult.PinExpired;
// valid = false;
// }
// else
// {
// supportPIN.IsUsed = true;
// supportPIN.UsingDate = DateTime.Now;
// supportPIN.Notice = computerName;
// }
//}
if (y.Count == 0)
{
result = UserValidationResult.IncorrectPin;
valid = false;
}
else
{
supportPIN = y[0];
if (supportPIN.ExpirationDate < DateTime.Now)
{
//if (supportPIN.IsUsed.HasValue && supportPIN.IsUsed.Value)
// result = UserValidationResult.PinAlreadyUsed;
//else if (supportPIN.ExpirationDate < DateTime.Now)
result = UserValidationResult.PinExpired;
valid = false;
}
else
{
supportPIN.IsUsed = true;
supportPIN.UsingDate = DateTime.Now;
supportPIN.Notice = computerName;
}
}
//Bis hier einkommentieren
}
//Bis hier einkommentieren
}
}
if (!result.HasValue)
@@ -846,6 +844,8 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
//pSupportPin.ExpirationDate = DateTime.Now.AddDays(3);
var lSupportPin = MapperFactory.SupportPinDC_SupportPin.MapToNewEntity(pSupportPin);
DAOFactory.GenericDAO.Insert(lSupportPin);
return lSupportPin.Oid.Value;