cosmetic
This commit is contained in:
parent
c954dc74f0
commit
36b4b65367
3 changed files with 17 additions and 19 deletions
|
@ -1,15 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* @brief testMail, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Osku and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\testMail;
|
||||
|
@ -17,8 +7,8 @@ namespace Dotclear\Plugin\testMail;
|
|||
use Dotclear\Core\Process;
|
||||
|
||||
/**
|
||||
* @brief testMail backend class.
|
||||
* @ingroup testMail
|
||||
* @brief testMail backend class.
|
||||
* @ingroup testMail
|
||||
*
|
||||
* @author Osku (author)
|
||||
* @author Jean-Christian Denis (author)
|
||||
|
|
|
@ -26,8 +26,8 @@ use Dotclear\Helper\Text;
|
|||
use Exception;
|
||||
|
||||
/**
|
||||
* @brief testMail manage class.
|
||||
* @ingroup testMail
|
||||
* @brief testMail manage class.
|
||||
* @ingroup testMail
|
||||
*
|
||||
* @author Osku (author)
|
||||
* @author Jean-Christian Denis (author)
|
||||
|
|
16
src/My.php
16
src/My.php
|
@ -8,8 +8,8 @@ use Dotclear\App;
|
|||
use Dotclear\Module\MyPlugin;
|
||||
|
||||
/**
|
||||
* @brief testMail My helper.
|
||||
* @ingroup testMail
|
||||
* @brief testMail My helper.
|
||||
* @ingroup testMail
|
||||
*
|
||||
* @author Osku (author)
|
||||
* @author Jean-Christian Denis (author)
|
||||
|
@ -17,11 +17,19 @@ use Dotclear\Module\MyPlugin;
|
|||
*/
|
||||
class My extends MyPlugin
|
||||
{
|
||||
/** @var string Mailer name */
|
||||
/**
|
||||
* Mailer name.
|
||||
*
|
||||
* @var string X_MAILER
|
||||
*/
|
||||
public const X_MAILER = 'Dotclear';
|
||||
|
||||
public static function checkCustomContext(int $context): ?bool
|
||||
{
|
||||
return App::task()->checkContext('BACKEND') && App::auth()->isSuperAdmin();
|
||||
// Limit to super admin
|
||||
return match ($context) {
|
||||
self::MODULE => App::auth()->isSuperAdmin(),
|
||||
default => null,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue