tiny bugfix on bundle permissions

This commit is contained in:
naomi 2018-05-08 16:10:00 +02:00
parent 7dba72ef66
commit b8bba0b332

View File

@ -54,8 +54,7 @@ class OCActorAccessControlHandler extends EntityAccessControlHandler {
* {@inheritdoc}
*/
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
$bundle = $entity->bundle();
return AccessResult::allowedIfHasPermission($account, "add $bundle entities");
return AccessResult::allowedIfHasPermission($account, "add $entity_bundle entities");
}
}