diff --git a/src/My.php b/src/My.php index 5167b7c..8c54c89 100644 --- a/src/My.php +++ b/src/My.php @@ -25,7 +25,11 @@ class My extends MyPlugin public static function checkCustomContext(int $context): ?bool { - return in_array($context, [My::BACKEND, My::MANAGE, My::MENU]) ? App::auth()->isSuperAdmin() : null; + // Limit to super admin + return match($context) { + self::MODULE => App::auth()->isSuperAdmin(), + default => null, + }; } /**