You are here

protected function PrivateMessageThreadAccessAccessControlHandler::checkCreateAccess in Private Message 8

Separate from the checkAccess because the entity does not yet exist, it will be created during the 'add' process.

Overrides EntityAccessControlHandler::checkCreateAccess

File

src/Entity/Access/PrivateMessageThreadAccessTimeAccessControlHandler.php, line 20

Class

PrivateMessageThreadAccessAccessControlHandler
Access control handler for private message thread last access time entities.

Namespace

Drupal\private_message\Entity\Access

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
  return AccessResult::allowedIfHasPermission($account, 'use private messaging system');
}