2023-03-11 14:53:06 +00:00
|
|
|
<?php
|
2023-10-11 21:33:47 +00:00
|
|
|
|
2023-03-11 14:53:06 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Dotclear\Plugin\dcLog;
|
|
|
|
|
2023-10-07 20:57:21 +00:00
|
|
|
use Dotclear\App;
|
2023-07-28 21:39:25 +00:00
|
|
|
use Dotclear\Module\MyPlugin;
|
2023-03-11 14:53:06 +00:00
|
|
|
|
2023-10-11 21:33:47 +00:00
|
|
|
/**
|
|
|
|
* @brief dcLog My helper.
|
|
|
|
* @ingroup dcLog
|
|
|
|
*
|
|
|
|
* @author Tomtom (author)
|
|
|
|
* @author Jean-Christian Denis (latest)
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
2023-07-28 21:39:25 +00:00
|
|
|
class My extends MyPlugin
|
2023-03-11 14:53:06 +00:00
|
|
|
{
|
2023-10-11 21:33:47 +00:00
|
|
|
/**
|
|
|
|
* Admin list ID.
|
|
|
|
*
|
|
|
|
* @var string BACKEND_LIST_ID
|
|
|
|
*/
|
2023-03-11 14:53:06 +00:00
|
|
|
public const BACKEND_LIST_ID = 'dcloglist';
|
|
|
|
|
2023-07-28 21:39:25 +00:00
|
|
|
public static function checkCustomContext(int $context): ?bool
|
2023-05-08 08:29:26 +00:00
|
|
|
{
|
2023-10-11 21:33:47 +00:00
|
|
|
// Limit module to super admin
|
2023-10-07 20:57:21 +00:00
|
|
|
return App::auth()->isSuperAdmin();
|
2023-03-11 14:53:06 +00:00
|
|
|
}
|
|
|
|
}
|