From acb524a48d470a7d997bc7e150685a227b1f0724 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 4 Nov 2023 18:58:41 +0100 Subject: [PATCH] fix perms --- src/My.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/My.php b/src/My.php index d64d179..5add6b7 100644 --- a/src/My.php +++ b/src/My.php @@ -26,9 +26,8 @@ class My extends MyPlugin protected static function checkCustomContext(int $context): ?bool { return match ($context) { - // Allow BACKEND and MANAGE and MENU to also content admin - self::BACKEND, self::MANAGE, self::MENU => App::task()->checkContext('BACKEND') - && App::blog()->isDefined() + // Add content admin perm to backend + self::MANAGE, self::MENU => App::task()->checkContext('BACKEND') && App::auth()->check(App::auth()->makePermissions([ App::auth()::PERMISSION_CONTENT_ADMIN, ]), App::blog()->id()),