maybe better permissions check

master
Jean-Christian Paul Denis 2023-10-21 22:46:53 +02:00
parent e5790dfa23
commit 25588c2d1b
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 2 additions and 2 deletions

View File

@ -44,9 +44,9 @@ class My extends MyPlugin
public static function checkCustomContext(int $context): ?bool public static function checkCustomContext(int $context): ?bool
{ {
// Only backend and super admin // Limit to super admin
return match ($context) { return match ($context) {
self::MODULE => App::task()->checkContext('BACKEND') && App::auth()->isSuperAdmin(), self::MODULE => App::auth()->isSuperAdmin(),
default => null, default => null,
}; };
} }