mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 17:13:47 +02:00
2017-04-03 Fred Gleason <fredg@paravelsystems.com>
* Added a 'USERS.LOCAL_AUTH' field to the database. * Added a 'USERS.PAM_SERVICE' field to the database. * Added an index on 'STATIONS.IPV4_ADDRESS' to the database. * Incremented the database version to 262. * Added 'RDUser::localAuthentication()', 'RDUser::setLocalAuthentication()', 'RDUser::pamService()' and 'RDUser::setPamService()' methods in 'lib/rduser.cpp' and 'lib/rduser.h'. * Added 'PAM Service' and 'Authenticate This User Locally' controls to the Edit User dialog in 'rdadmin/edit_user.cpp' and 'rdadmin/edit_user.h'. * Added a PAM service configuration in 'conf/rivendell.pam'.
This commit is contained in:
@@ -202,6 +202,10 @@ void MainObject::Revert(int schema) const
|
||||
case 261:
|
||||
Revert261();
|
||||
break;
|
||||
|
||||
case 262:
|
||||
Revert262();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -567,6 +571,27 @@ void MainObject::Revert261() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert262() const
|
||||
{
|
||||
QString sql;
|
||||
QSqlQuery *q;
|
||||
|
||||
sql=QString("alter table USERS drop column LOCAL_AUTH");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table USERS drop column PAM_SERVICE");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("drop index IPV4_ADDRESS_IDX on STATIONS");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
SetVersion(261);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
@@ -609,7 +634,7 @@ int MainObject::MapSchema(const QString &ver)
|
||||
version_map["2.13"]=255;
|
||||
version_map["2.14"]=258;
|
||||
version_map["2.15"]=259;
|
||||
version_map["2.16"]=261;
|
||||
version_map["2.16"]=262;
|
||||
|
||||
//
|
||||
// Normalize String
|
||||
|
@@ -57,6 +57,7 @@ class MainObject : public QObject
|
||||
void Revert259() const;
|
||||
void Revert260() const;
|
||||
void Revert261() const;
|
||||
void Revert262() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
Reference in New Issue
Block a user