mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 00:53:53 +02:00
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:
@@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 345
|
||||
#define RD_VERSION_DATABASE 346
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@@ -1724,7 +1724,7 @@ unsigned RDFeed::create(const QString &keyname,bool enable_users,
|
||||
//
|
||||
if(enable_users) {
|
||||
sql=QString("select LOGIN_NAME from USERS where ")+
|
||||
"(ADMIN_USERS_PRIV='N')&&(ADMIN_CONFIG_PRIV='N')";
|
||||
"(ADMIN_RSS_PRIV='N')&&(ADMIN_CONFIG_PRIV='N')";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString("insert into FEED_PERMS set ")+
|
||||
|
@@ -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,
|
||||
|
@@ -55,6 +55,8 @@ class RDUser
|
||||
void setWebapiAuthTimeout(int sec) const;
|
||||
bool adminConfig() const;
|
||||
void setAdminConfig(bool priv) const;
|
||||
bool adminRss() const;
|
||||
void setAdminRss(bool priv) const;
|
||||
bool createCarts() const;
|
||||
void setCreateCarts(bool priv) const;
|
||||
bool deleteCarts() const;
|
||||
|
Reference in New Issue
Block a user