review permissions

master
Jean-Christian Paul Denis 2023-11-04 10:42:35 +01:00
parent af0c73045e
commit 9fb14131a8
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 2 additions and 1 deletions

View File

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