You are here

public function PublishContentAccess::accessPublishOwnType in Publish Content 8

Access publish own content of specified type (bundle).

1 call to PublishContentAccess::accessPublishOwnType()
PublishContentAccess::access in src/Access/PublishContentAccess.php

File

src/Access/PublishContentAccess.php, line 124

Class

PublishContentAccess
Access class checking the permissions for publishing and unpublishing.

Namespace

Drupal\publishcontent\Access

Code

public function accessPublishOwnType() {
  return $this
    ->checkPermission(Perm::PUBLISH_OWN_TYPE) && $this->node
    ->getOwnerId() == $this->account
    ->id();
}