Some entity types from modules like https://www.drupal.org/project/fieldable_panels_panes allow permissions on their bundles, but this module doesnt quite take that into consideration

around line 280 "entity_access() doesn't provide a generic bundle create op access check.", references_dialog_entityreference_link_helper() seems to be a wrapper for this situation

See supplied patch to make it work with FPP, however maybe there's a better way by

default:
$access = entity_access('create', $entity_type);
break;

to something like

default:
$access = entity_access('create', $entity_type, $bundle);
break;

Comments

jojonaloha’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

I also wanting to support create access for fieldable panel panes. I think the attached patch is more generic though. Also, the third parameter to entity_access must be an entity, which is why I use entity_create. See http://www.drupal.org/node/2177497