From 68aa58285ecfa21c5d68e0103840af72ce714a20 Mon Sep 17 00:00:00 2001 From: i-just Date: Mon, 9 Dec 2024 08:22:17 +0000 Subject: [PATCH] require admin for any settings action --- src/controllers/SettingsController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/controllers/SettingsController.php b/src/controllers/SettingsController.php index 449b279..464678a 100644 --- a/src/controllers/SettingsController.php +++ b/src/controllers/SettingsController.php @@ -23,6 +23,17 @@ */ class SettingsController extends Controller { + + /** + * @inheritdoc + */ + public function beforeAction($action): bool + { + $this->requireAdmin(); + + return parent::beforeAction($action); + } + /** * Display a form to allow an administrator to update plugin's API settings. *