Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommentAccessControlHandler.php

function CommentAccessControlHandler::checkCreateAccess

Overrides EntityAccessControlHandler::checkCreateAccess

File

core/modules/comment/src/CommentAccessControlHandler.php, line 65

Class

CommentAccessControlHandler
Defines the access control handler for the comment entity type.

Namespace

Drupal\comment

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
    return AccessResult::allowedIfHasPermission($account, 'post comments');
}
RSS feed
Powered by Drupal