From 25588c2d1b83f0cc0dabc4b21ee5f96c8b2f0e4d Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 21 Oct 2023 22:46:53 +0200 Subject: [PATCH] maybe better permissions check --- src/My.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/My.php b/src/My.php index 9f8bb0c..9d2dd4e 100644 --- a/src/My.php +++ b/src/My.php @@ -44,9 +44,9 @@ class My extends MyPlugin public static function checkCustomContext(int $context): ?bool { - // Only backend and super admin + // Limit to super admin return match ($context) { - self::MODULE => App::task()->checkContext('BACKEND') && App::auth()->isSuperAdmin(), + self::MODULE => App::auth()->isSuperAdmin(), default => null, }; }