fix perms
This commit is contained in:
parent
db564e6d21
commit
acb524a48d
1 changed files with 2 additions and 3 deletions
|
@ -26,9 +26,8 @@ class My extends MyPlugin
|
||||||
protected static function checkCustomContext(int $context): ?bool
|
protected static function checkCustomContext(int $context): ?bool
|
||||||
{
|
{
|
||||||
return match ($context) {
|
return match ($context) {
|
||||||
// Allow BACKEND and MANAGE and MENU to also content admin
|
// Add content admin perm to backend
|
||||||
self::BACKEND, self::MANAGE, self::MENU => App::task()->checkContext('BACKEND')
|
self::MANAGE, self::MENU => App::task()->checkContext('BACKEND')
|
||||||
&& App::blog()->isDefined()
|
|
||||||
&& 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()),
|
||||||
|
|
Loading…
Reference in a new issue