mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-29 20:05:38 +03:00
Запрет залогинивания уже залогининых
This commit is contained in:
@@ -51,7 +51,7 @@ bool InterfaceDataBaseLMS::AuthorizationInstructor(QString login, QString passwo
|
|||||||
|
|
||||||
if(int id = selectInstructorID(login, password))
|
if(int id = selectInstructorID(login, password))
|
||||||
{
|
{
|
||||||
if(isArchivedInstructor(id))
|
if(isArchivedInstructor(id) || isLoggedInInstructor(id))
|
||||||
{
|
{
|
||||||
transactionEnd();
|
transactionEnd();
|
||||||
return false;
|
return false;
|
||||||
@@ -179,7 +179,7 @@ bool InterfaceDataBaseLMS::AuthorizationTrainee(QString login, QString password,
|
|||||||
|
|
||||||
if(int id = selectTraineeID(login, password))
|
if(int id = selectTraineeID(login, password))
|
||||||
{
|
{
|
||||||
if(isArchivedTrainee(id))
|
if(isArchivedTrainee(id) || isLoggedInTrainee(id))
|
||||||
{
|
{
|
||||||
transactionEnd();
|
transactionEnd();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ void ProcessingSystem::processingClientAutorization(ClientHandler *client, Clien
|
|||||||
|
|
||||||
arrayAnswer = dataParser->ClientAnswer()->authorization(true, instructorName, traineeName, "trainee", clientAutorization.Login);
|
arrayAnswer = dataParser->ClientAnswer()->authorization(true, instructorName, traineeName, "trainee", clientAutorization.Login);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{//Никто не авторизовался
|
||||||
|
arrayAnswer = dataParser->ClientAnswer()->authorization(false, "", "", "", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{//Никто не авторизовался
|
{//Никто не авторизовался
|
||||||
|
|||||||
Reference in New Issue
Block a user