This commit is contained in:
Jean-Christian Denis 2023-10-11 21:06:12 +02:00
parent 208963952c
commit 4ec3ac9610
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
3 changed files with 13 additions and 7 deletions

View file

@ -1,3 +1,9 @@
enhancePostContent 2023.10.11
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Code review
enhancePostContent 2023.10.08 enhancePostContent 2023.10.08
=========================================================== ===========================================================
* Require Dotclear 2.28 * Require Dotclear 2.28

View file

@ -13,7 +13,6 @@ use Dotclear\Helper\Date;
use Dotclear\Helper\Html\Form\Checkbox; use Dotclear\Helper\Html\Form\Checkbox;
use Dotclear\Helper\Html\Html; use Dotclear\Helper\Html\Html;
/** /**
* @brief enhancePostContent filters list class. * @brief enhancePostContent filters list class.
* @ingroup enhancePostContent * @ingroup enhancePostContent
@ -92,4 +91,4 @@ class BackendList extends Listing
implode($cols) . implode($cols) .
'</tr>'; '</tr>';
} }
} }

View file

@ -21,10 +21,11 @@ class My extends MyPlugin
{ {
return match ($context) { return match ($context) {
// Limit main backend featrues to content admin // Limit main backend featrues to content admin
self::BACKEND, self::MANAGE, self::MENU => self::BACKEND, self::MANAGE, self::MENU => 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()),
default => null, default => null,
};
}
}