From c07071cbcadd1c9de9951d9ba497b73752ee52cc Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Thu, 11 May 2017 21:53:25 +0200 Subject: [PATCH] auth_check lowers cpu usage for checking if the user has permission for the page requested when used in place of guiconfig, especially useful for frequent requests like those made by stats and traffic widgets --- src/etc/inc/auth_check.inc | 79 +++++++++++++++++++ src/usr/local/www/bandwidth_by_ip.php | 2 +- src/usr/local/www/getstats.php | 2 +- src/usr/local/www/ifstats.php | 2 +- .../www/widgets/widgets/ipsec.widget.php | 2 +- 5 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 src/etc/inc/auth_check.inc diff --git a/src/etc/inc/auth_check.inc b/src/etc/inc/auth_check.inc new file mode 100644 index 0000000000..93dbd7a614 --- /dev/null +++ b/src/etc/inc/auth_check.inc @@ -0,0 +1,79 @@ +