From 534ef54aabd792c943ba0bd8b1e2674350539462 Mon Sep 17 00:00:00 2001 From: krivoshein Date: Wed, 29 Jan 2025 16:25:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BF=D1=80=D0=B5=D1=82=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BB=D0=BE=D0=B3=D0=B8=D0=BD=D0=B8=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D1=83=D0=B6=D0=B5=20=D0=B7=D0=B0=D0=BB=D0=BE?= =?UTF-8?q?=D0=B3=D0=B8=D0=BD=D0=B8=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBaseLMS/interfacedatabaselms.cpp | 4 ++-- ServerLMS/Systems/processingsystem.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DataBaseLMS/interfacedatabaselms.cpp b/DataBaseLMS/interfacedatabaselms.cpp index 944ad9a..650a55b 100644 --- a/DataBaseLMS/interfacedatabaselms.cpp +++ b/DataBaseLMS/interfacedatabaselms.cpp @@ -51,7 +51,7 @@ bool InterfaceDataBaseLMS::AuthorizationInstructor(QString login, QString passwo if(int id = selectInstructorID(login, password)) { - if(isArchivedInstructor(id)) + if(isArchivedInstructor(id) || isLoggedInInstructor(id)) { transactionEnd(); return false; @@ -179,7 +179,7 @@ bool InterfaceDataBaseLMS::AuthorizationTrainee(QString login, QString password, if(int id = selectTraineeID(login, password)) { - if(isArchivedTrainee(id)) + if(isArchivedTrainee(id) || isLoggedInTrainee(id)) { transactionEnd(); return false; diff --git a/ServerLMS/Systems/processingsystem.cpp b/ServerLMS/Systems/processingsystem.cpp index 599866e..bbbd562 100644 --- a/ServerLMS/Systems/processingsystem.cpp +++ b/ServerLMS/Systems/processingsystem.cpp @@ -74,6 +74,10 @@ void ProcessingSystem::processingClientAutorization(ClientHandler *client, Clien arrayAnswer = dataParser->ClientAnswer()->authorization(true, instructorName, traineeName, "trainee", clientAutorization.Login); } + else + {//Никто не авторизовался + arrayAnswer = dataParser->ClientAnswer()->authorization(false, "", "", "", ""); + } } else {//Никто не авторизовался