You are here

public function PHPMailerMailPreviewController::access in PHPMailer 8.3

Determines access for the HTML mail preview page.

Parameters

\Drupal\Core\Session\AccountInterface $account: The currently logged in account.

Return value

bool The access result.

1 string reference to 'PHPMailerMailPreviewController::access'
phpmailer.routing.yml in ./phpmailer.routing.yml
phpmailer.routing.yml

File

src/Controller/PHPMailerMailPreviewController.php, line 21

Class

PHPMailerMailPreviewController
Access check for user tracker routes.

Namespace

Drupal\phpmailer\Controller

Code

public function access(AccountInterface $account) {

  /**
   * @todo This may need to be fixed for D8.
   */
  if (\Drupal::moduleHandler()
    ->moduleExists('mimemail')) {
    return $account
      ->hasPermission('administer phpmailer settings');
  }
  return FALSE;
}