Closed (fixed)
Project:
Inline Entity Form
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 May 2013 at 13:29 UTC
Updated:
31 Aug 2013 at 09:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
dave reidWe're actually pretty sure this is a bug in entity's access system: #1780646: entity_access() fails to check node type specific create access
Comment #2
dpolant commentedYou are right. The new patch that creates a special case for nodes and just calls node_access instead of entity_access.
Its hard to make this fix generic for all entities because who knows how their entity access callbacks work. I think the best we can do now is just to make this work for nodes. In theory the individual entity modules can craft their entity access callbacks to accept a string for "create" checks like node_access does, and thus the entity_access call in IEF should work for them.
Not sure I like this ad-hoc approach, but short of creating some kind of hook/plugin structure through which modules that want to use IEF can say which way their access function works, there isn't a whole lot we can do. Just fixing node support seems like the best thing for IEF right now, until the community decides on a consistent approach for doing "create" access checks.
Comment #3
bojanz commentedI am not interested in committing a workaround for what is obviously an Entity API issue (and which already has patches).
Still, keeping the issue open for now.
Comment #4
JvE commentedGood thing you did.
Apparently the bug is in Inline Entity Form after all now that fago documented the 'create' case in #1780646: entity_access() fails to check node type specific create access:
Pretty much exactly what's already in place for commerce entities.
Comment #5
mile23JvE: That patch doesn't apply cleanly.
Here's a re-do. Apologies for not adding tests.
Comment #6
bojanz commentedOkay, committed, now it's up to Entity API to fix its bug :)
Comment #8
RobertoGA commentedI'm using 7.x-1.3 version of Inline Entity Form where this patch has been applied and the errors continue appearing.
Apparently this error is not from IEF, is from Entity module. My issue has been solved at this entry appling the last patch at this moment:
1780646-202-entity-node-access.patch
I apologize for open the issue, I'm going to close it.