From 71e3de1834417ae6ab328efb761e7b5ce71ba849 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 23 Oct 2023 11:28:57 +0200 Subject: [PATCH] cleanup perms --- src/My.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/My.php b/src/My.php index a3b8713..6573758 100644 --- a/src/My.php +++ b/src/My.php @@ -40,8 +40,8 @@ class My extends MyPlugin public static function checkCustomContext(int $context): ?bool { return match ($context) { - self::MENU, self::MANAGE, self::BACKEND => App::task()->checkContext('BACKEND') - && App::blog()->isDefined() + // Add content admin perm to backend + self::MENU, self::MANAGE => App::task()->checkContext('BACKEND') && App::auth()->check(App::auth()->makePermissions([ App::auth()::PERMISSION_CONTENT_ADMIN, ]), App::blog()->id()),