2020-11-24 Fred Gleason <fredg@paravelsystems.com>

* Removed the 'USERS.ADMIN_USERS_PRIV' field from the database.
	* Added a 'USERS.ADMIN_RSS_PRIV' field to the database.
	* Incremented the database version to 346.
	* Added 'RDUser:adminRss()' and 'RDUser::setAdminRss()' methods.
	* Added an 'Administer RSS Feeds' checkbox to the 'Administrative
	Rights' section of the 'User' dialog in rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2020-11-24 18:57:20 -05:00
parent 82a368fdca
commit 57f2917ceb
26 changed files with 388 additions and 184 deletions

View File

@@ -2,7 +2,7 @@
//
// Abstract a Rivendell User.
//
// (C) Copyright 2002-2003,2016 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -248,6 +248,19 @@ void RDUser::setAdminConfig(bool priv) const
}
bool RDUser::adminRss() const
{
return RDBool(RDGetSqlValue("USERS","LOGIN_NAME",user_name,
"ADMIN_RSS_PRIV").toString());
}
void RDUser::setAdminRss(bool priv) const
{
SetRow("ADMIN_RSS_PRIV",priv);
}
bool RDUser::createCarts() const
{
return RDBool(RDGetSqlValue("USERS","LOGIN_NAME",user_name,