fix perms

This commit is contained in:
Jean-Christian Paul Denis 2023-11-04 20:36:26 +01:00
parent c871bb1e4c
commit c8654bb0bb
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -19,6 +19,7 @@ class My extends MyPlugin
public static function checkCustomContext(int $context): ?bool public static function checkCustomContext(int $context): ?bool
{ {
return match ($context) { return match ($context) {
// Add usage perm to backend
self::MANAGE, self::MENU => App::task()->checkContext('BACKEND') self::MANAGE, self::MENU => App::task()->checkContext('BACKEND')
&& App::auth()->check(App::auth()->makePermissions([ && App::auth()->check(App::auth()->makePermissions([
App::auth()::PERMISSION_USAGE, App::auth()::PERMISSION_USAGE,