Implemented application login.
Minor UI improvement. Fixed memory leaks.
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
#include <QHeaderView>
|
||||
#include "../data/core-data.h"
|
||||
#include "../service.h"
|
||||
#include "../permissionservice.h"
|
||||
#include "../emptystringvalidator.h"
|
||||
#include "../samestringvalidator.h"
|
||||
#include <QCryptographicHash>
|
||||
|
||||
UserForm::UserForm(QWidget *parent) :
|
||||
AutoForm<User>(parent),
|
||||
@@ -69,8 +69,9 @@ bool UserForm::bindOtherToData()
|
||||
this->entity()->addRole(srv.loadById(ui->tableWidget->item(i,0)->data(Qt::UserRole).toInt()));
|
||||
}
|
||||
}
|
||||
PermissionService permService;
|
||||
if (m_passChanged){
|
||||
this->entity()->setPassword(QString(QCryptographicHash::hash(ui->password->text().toUtf8(),QCryptographicHash::Sha256).toBase64()));
|
||||
this->entity()->setPassword(permService.encryptPassword(ui->password->text()));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user