The readme file states: "The module will respect your access permissions, so make sure you are logged in." Does this mean that it is _necessary_ to be logged in?
If I set node creation to allowed anonymous users, and verify that they have access to /node/add/page
then I would expect an anonymous user to be able to create nodes with restws as well.
This doesn't work however as
$resource->access($op, $id)
from line 120 in restws.module:
if (user_access('access resource ' . $resource_name) && $resource->access($op, $id)) {
returns false
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1196614-restws-readme-permissions.patch | 943 bytes | klausi |
Comments
Comment #1
Letharion commentedFWIW, if I comment out the test that returns false, the node is successfully created.
Comment #2
klausiNo, you don't have to be logged in, the permissions can also be assigned to anonymous users. For security reasons we have introduced an extra permission to access resources via RESTWS, so you have to enable that for anonymous users, too.
Maybe the README needs an update? Patch attached
Comment #3
klausiCommitted: http://drupalcode.org/project/restws.git/commit/b876662