mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2018-08-20 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that failed to close the program after a failed login.
This commit is contained in:
@@ -136,13 +136,13 @@ void Login::okData()
|
||||
{
|
||||
*login_name=login_name_edit->text();
|
||||
*login_password=login_password_edit->text();
|
||||
done(0);
|
||||
done(true);
|
||||
}
|
||||
|
||||
|
||||
void Login::cancelData()
|
||||
{
|
||||
done(1);
|
||||
done(false);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -123,19 +123,19 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Log In
|
||||
//
|
||||
Login *login=new Login(&admin_username,&admin_password,this);
|
||||
if(login->exec()!=0) {
|
||||
if(!login->exec()) {
|
||||
exit(0);
|
||||
}
|
||||
rda->user()->setName(admin_username);
|
||||
if(!rda->user()->checkPassword(admin_password,false)) {
|
||||
QMessageBox::warning(this,"Login Failed","Login Failed!.\n");
|
||||
exiting=true;
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
if(!rda->user()->adminConfig()) {
|
||||
QMessageBox::warning(this,tr("Insufficient Priviledges"),
|
||||
tr("This account has insufficient priviledges for this operation."));
|
||||
exiting=true;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user