maybe better permissions check

This commit is contained in:
Jean-Christian Denis 2023-10-21 22:46:53 +02:00
parent e5790dfa23
commit 25588c2d1b
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -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,
};
}