Endpoint.php
16 lines
| 1 | <?php declare(strict_types = 1); |
| 2 | |
| 3 | namespace MailPoet\Automation\Engine\API; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\API\REST\Endpoint as MailPoetEndpoint; |
| 9 | use MailPoet\Automation\Engine\Engine; |
| 10 | |
| 11 | abstract class Endpoint extends MailPoetEndpoint { |
| 12 | public function checkPermissions(): bool { |
| 13 | return current_user_can(Engine::CAPABILITY_MANAGE_AUTOMATIONS); |
| 14 | } |
| 15 | } |
| 16 |