mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-18 22:22:36 +02:00
2021-06-10 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that threw a SQL error when attempting to add a new user. * Fixed a bug in rdadmin(1) that caused the incorrect Login Name to appear in the 'Rivendell User List' dialog immediately after adding the user. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
64eb9860ce
commit
f7ade0d59e
@ -21865,3 +21865,9 @@
|
||||
2021-06-04 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Corrected file permissions and ownerships for rsyslog in
|
||||
'debian/postinst'.
|
||||
2021-06-10 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdadmin(1) that threw a SQL error when attempting
|
||||
to add a new user.
|
||||
* Fixed a bug in rdadmin(1) that caused the incorrect Login Name
|
||||
to appear in the 'Rivendell User List' dialog immediately after
|
||||
adding the user.
|
||||
|
@ -213,10 +213,10 @@ void RDUserListModel::refresh(const QModelIndex &row)
|
||||
}
|
||||
|
||||
|
||||
void RDUserListModel::refresh(const QString &grpname)
|
||||
void RDUserListModel::refresh(const QString &username)
|
||||
{
|
||||
for(int i=0;i<d_texts.size();i++) {
|
||||
if(d_texts.at(i).at(0)==grpname) {
|
||||
if(d_texts.at(i).at(0)==username) {
|
||||
updateRowLine(i);
|
||||
return;
|
||||
}
|
||||
@ -267,7 +267,7 @@ void RDUserListModel::updateRowLine(int line)
|
||||
{
|
||||
if(line<d_texts.size()) {
|
||||
QString sql=sqlFields()+
|
||||
filterSql(d_texts.at(line).at(line).toString());
|
||||
filterSql(d_texts.at(line).at(0).toString());
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
updateRow(line,q);
|
||||
|
@ -35,10 +35,8 @@ AddUser::AddUser(QString *username,QWidget *parent)
|
||||
//
|
||||
// Fix the Window Size
|
||||
//
|
||||
setMinimumWidth(sizeHint().width());
|
||||
setMaximumWidth(sizeHint().width());
|
||||
setMinimumHeight(sizeHint().height());
|
||||
setMaximumHeight(sizeHint().height());
|
||||
setMinimumSize(sizeHint());
|
||||
setMaximumSize(sizeHint());
|
||||
|
||||
setWindowTitle("RDAdmin - "+tr("Add User"));
|
||||
|
||||
@ -104,16 +102,12 @@ void AddUser::okData()
|
||||
}
|
||||
|
||||
sql=QString("insert into `USERS` set ")+
|
||||
"`LOGIN_NAME`='"+RDEscapeString(username)+"',"+
|
||||
"`PASSWORD`=PASSWORD('')";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(!q->isActive()) {
|
||||
"`LOGIN_NAME`='"+RDEscapeString(username)+"'";
|
||||
if(!RDSqlQuery::apply(sql)) {
|
||||
QMessageBox::warning(this,tr("User Exists"),tr("User Already Exists!"),
|
||||
1,0,0);
|
||||
delete q;
|
||||
return;
|
||||
}
|
||||
delete q;
|
||||
sql="select `NAME` from `GROUPS`";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user