Active
Project:
RESTful Web Services
Version:
7.x-2.0-alpha5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2013 at 08:35 UTC
Updated:
11 May 2014 at 21:19 UTC
Jump to comment: Most recent
Comments
Comment #1
Roeneman-1 commentedRun into this today as well and solved it by inserting the group node nid as 'id' into RESTWS via hook_restws_request_alter.
Problem seems to be that when making a query, RESTWS does not send an entity id (for instance a node nid) to entity_access. As a result entity_access determines whether the user has access to all entity's of the same kind (same bundle I believe). That is typically FALSE when you have OG installed, so access is denied.
As a solution I found 'hook_restws_request_alter' to be helpfull.
When I insert NID for which the access rights should be checked through that hook, my access denied issue is solved.
So put something like this in a module:
So it is not really a bug, it seems to be by design. And the solution is not really difficult and typically something that needs to be tailor made for every access module and site, I think.
But a watchdog notice pointing me into this direction would have been helpfull, so if I may issue that as an improvement.
Rgds, Roeneman
Comment #2
btopro commentedSomewhat related: A lot of times using restws w/ OG based systems (while UUID is on) bricks calls for nodes that relate to groups. This patch resolves that: https://drupal.org/node/1927474