cleanup perms

This commit is contained in:
Jean-Christian Paul Denis 2023-10-23 11:28:57 +02:00
parent f153fea285
commit 71e3de1834
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -40,8 +40,8 @@ class My extends MyPlugin
public static function checkCustomContext(int $context): ?bool public static function checkCustomContext(int $context): ?bool
{ {
return match ($context) { return match ($context) {
self::MENU, self::MANAGE, self::BACKEND => App::task()->checkContext('BACKEND') // Add content admin perm to backend
&& App::blog()->isDefined() self::MENU, self::MANAGE => App::task()->checkContext('BACKEND')
&& App::auth()->check(App::auth()->makePermissions([ && App::auth()->check(App::auth()->makePermissions([
App::auth()::PERMISSION_CONTENT_ADMIN, App::auth()::PERMISSION_CONTENT_ADMIN,
]), App::blog()->id()), ]), App::blog()->id()),