Im logged in as admin and attempting to read a private message but so far I'm getting 403. Has anyone got this to work with RestWS?|

Comments

Media Crumb’s picture

Shouldnt all entities work?

spjsche’s picture

Currently running version 7.x.2.7 of the RESTful Web services module, and I too am getting the said error when trying to read a private message.

The below shows my results of what works, and what does not work, and was wondering if there is a solution to this problem.

Access the resource field_collection_item -> OK
Access the resource node -> OK
Access the resource og_membership_type -> OK
Access the resource og_membership -> OK
Access the resource privatemsg_message -> 403 Forbidden
Access the resource file -> OK
Access the resource taxonomy_term -> OK
Access the resource taxonomy_vocabulary -> OK
Access the resource user -> OK
Access the resource wysiwyg_profile -> 403 Forbidden

Thanking you in anticipation
Stephen

spjsche’s picture

On investigation the 'entity_access' function retrieves an array of entities via the 'entity_get_info'
function and ensures that there exists an 'access callback' entry in the array for each resource.

The 'access callback' array entry exists for all the items that are marked OK, but is missing for the failing entities.

How does one go about implementing a fix for the 'privatemsg_message' issue.

Thanks
Stephen