function CommentAccessControlHandler::checkCreateAccess
Same name in other branches
- 9 core/modules/comment/src/CommentAccessControlHandler.php \Drupal\comment\CommentAccessControlHandler::checkCreateAccess()
- 10 core/modules/comment/src/CommentAccessControlHandler.php \Drupal\comment\CommentAccessControlHandler::checkCreateAccess()
- 11.x core/modules/comment/src/CommentAccessControlHandler.php \Drupal\comment\CommentAccessControlHandler::checkCreateAccess()
Overrides EntityAccessControlHandler::checkCreateAccess
File
-
core/
modules/ comment/ src/ CommentAccessControlHandler.php, line 64
Class
- CommentAccessControlHandler
- Defines the access control handler for the comment entity type.
Namespace
Drupal\commentCode
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return AccessResult::allowedIfHasPermission($account, 'post comments');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.