2017-03-27 Fred Gleason <fredg@paravelsystems.com>

* Added a 'WEBAPI_AUTHS' table to the database.
	* Added a 'USERS.WEBAPI_AUTH_TIMEOUT' field to the database.
	* Incremented the database version to 260.
	* Added 'RDUser::webapiAuthTimeout()' and
	'RDUser::setWebapiAuthTimeout()' methods in 'lib/rduser.cpp' and
	'lib/rduser.h'.
	* Added a 'WebAPI Timeout' control to the Edit User dialog in
	'rdadmin/edit_user.cpp' and 'rdadmin/edit_user.h'.
	* Implemented a 'CreateTicket' Web API call.
This commit is contained in:
Fred Gleason
2017-03-27 13:43:42 -04:00
parent 60a9deb349
commit bc2c441680
61 changed files with 602 additions and 639 deletions

View File

@@ -131,6 +131,7 @@ void MainObject::RunSystemMaintenance()
PurgeLogs();
PurgeElr();
PurgeGpioEvents();
PurgeWebapiAuths();
sql="update VERSION set LAST_MAINT_DATETIME=now()";
q=new RDSqlQuery(sql);
delete q;
@@ -280,6 +281,17 @@ void MainObject::PurgeGpioEvents()
delete q;
}
void MainObject::PurgeWebapiAuths()
{
QString sql;
RDSqlQuery *q;
sql=QString("delete from WEBAPI_AUTHS where EXPIRATION_DATETIME<now()");
q=new RDSqlQuery(sql);
delete q;
}
int main(int argc,char *argv[])
{

View File

@@ -44,6 +44,7 @@ class MainObject : public QObject
void PurgeElr();
void PurgeDropboxes();
void PurgeGpioEvents();
void PurgeWebapiAuths();
RDConfig *maint_config;
bool maint_verbose;
bool maint_system;