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:
Fred Gleason
2017-04-03 18:15:07 -04:00
parent 9cfcfcb5be
commit 275c08b156
21 changed files with 283 additions and 49 deletions

View File

@@ -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

View File

@@ -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);