From 7ccb452496e7463d508fa32c7450e381f09b468e Mon Sep 17 00:00:00 2001 From: jim-p Date: Sat, 11 May 2019 18:55:28 -0400 Subject: [PATCH] Fix ACB privileges. Fixes #9519 (cherry picked from commit 18c1de41332473dacd8a24ddf34e558f6366c714) --- src/etc/inc/priv.defs.inc | 22 ++++++++++++++++----- src/usr/local/www/services_acb.php | 8 ++++++++ src/usr/local/www/services_acb_backup.php | 8 ++++++++ src/usr/local/www/services_acb_settings.php | 6 +++--- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/etc/inc/priv.defs.inc b/src/etc/inc/priv.defs.inc index 0cb7eaed4a..12a3c1030d 100644 --- a/src/etc/inc/priv.defs.inc +++ b/src/etc/inc/priv.defs.inc @@ -567,11 +567,23 @@ $priv_list['page-system-packagemanager-installed']['descr'] = gettext("Allow acc $priv_list['page-system-packagemanager-installed']['match'] = array(); $priv_list['page-system-packagemanager-installed']['match'][] = "pkg_mgr_installed.php*"; -$priv_list['page-system-autoconfigbackup'] = array(); -$priv_list['page-system-autoconfigbackup']['name'] = gettext("WebCfg - System: Auto COnfig Backup"); -$priv_list['page-system-autoconfigbackup']['descr'] = gettext("Configure the auto config backup system."); -$priv_list['page-system-autoconfigbackup']['match'] = array(); -$priv_list['page-system-autoconfigbackup']['match'][] = "autoconfigbackup-settings.php*"; +$priv_list['page-services-acb'] = array(); +$priv_list['page-services-acb']['name'] = gettext("WebCfg - Services: Auto Config Backup: Restore"); +$priv_list['page-services-acb']['descr'] = gettext("Restore from auto config backup."); +$priv_list['page-services-acb']['match'] = array(); +$priv_list['page-services-acb']['match'][] = "services_acb.php*"; + +$priv_list['page-services-acb-backup'] = array(); +$priv_list['page-services-acb-backup']['name'] = gettext("WebCfg - Services: Auto Config Backup: Backup Now"); +$priv_list['page-services-acb-backup']['descr'] = gettext("Create a new auto config backup entry."); +$priv_list['page-services-acb-backup']['match'] = array(); +$priv_list['page-services-acb-backup']['match'][] = "services_acb_backup.php*"; + +$priv_list['page-services-acb-settings'] = array(); +$priv_list['page-services-acb-settings']['name'] = gettext("WebCfg - Services: Auto Config Backup: Settings"); +$priv_list['page-services-acb-settings']['descr'] = gettext("Configure the auto config backup system."); +$priv_list['page-services-acb-settings']['match'] = array(); +$priv_list['page-services-acb-settings']['match'][] = "services_acb_settings.php*"; $priv_list['page-services-captiveportal'] = array(); $priv_list['page-services-captiveportal']['name'] = gettext("WebCfg - Services: Captive Portal"); diff --git a/src/usr/local/www/services_acb.php b/src/usr/local/www/services_acb.php index 56bfc6d617..054eef32bc 100644 --- a/src/usr/local/www/services_acb.php +++ b/src/usr/local/www/services_acb.php @@ -18,6 +18,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +##|+PRIV +##|*IDENT=page-services-acb +##|*NAME=Services: Auto Config Backup: Restore +##|*DESCR=Restore from auto config backup. +##|*MATCH=services_acb.php* +##|-PRIV + require("guiconfig.inc"); require("acb.inc"); diff --git a/src/usr/local/www/services_acb_backup.php b/src/usr/local/www/services_acb_backup.php index 085218b823..a6bb7d72dc 100644 --- a/src/usr/local/www/services_acb_backup.php +++ b/src/usr/local/www/services_acb_backup.php @@ -18,6 +18,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +##|+PRIV +##|*IDENT=page-services-acb-backup +##|*NAME=Services: Auto Config Backup: Backup Now +##|*DESCR=Create a new auto config backup entry. +##|*MATCH=services_acb_backup.php* +##|-PRIV + require_once("globals.inc"); require_once("guiconfig.inc"); require_once("acb.inc"); diff --git a/src/usr/local/www/services_acb_settings.php b/src/usr/local/www/services_acb_settings.php index 6d902af536..676839e965 100644 --- a/src/usr/local/www/services_acb_settings.php +++ b/src/usr/local/www/services_acb_settings.php @@ -24,10 +24,10 @@ */ ##|+PRIV -##|*IDENT=page-system-autoconfigbackup -##|*NAME=System: Auto COnfig Backup +##|*IDENT=page-services-acb-settings +##|*NAME=Services: Auto Config Backup: Settings ##|*DESCR=Configure the auto config backup system. -##|*MATCH=autoconfigbackup-settings.php* +##|*MATCH=services_acb_settings.php* ##|-PRIV require_once("guiconfig.inc");