简体   繁体   English

使用REST API / JS使用ACL检索解析数据时出现问题

[英]Trouble retrieving Parse data with ACL using REST API / JS

Issue: I am creating records in my Parse.com custom object. 问题:我正在Parse.com自定义对象中创建记录。 Here is how my request / JSON payload looks like... 这是我的请求/ JSON有效负载的样子...

[INFO] :   {"message":"My record with ACL","ownerName":"Dude","ACL":{"77cUXY2h1T":{"read":true,"write":true}}}

Here is the response I get... 这是我得到的回应...

[INFO] :   {"createdAt":"2014-10-30T03:19:26.789Z","objectId":"0bcd7RfYf0"}

When I look at the record from my data browser, the ACL appears to be set correctly. 当我从数据浏览器查看记录时,ACL似乎设置正确。 I am logged in as the current user but when I query the records, I do not get the ones where I have ACL set up. 我以当前用户身份登录,但是查询记录时,找不到设置ACL的记录。 I can still create records with no ACL and retrieve them fine. 我仍然可以在没有ACL的情况下创建记录,并可以正常检索它们。 Did I not set something correctly or am I missing something? 我设置不正确或缺少什么吗?

Here is a screenshot of the data browser with ACL's setup. 这是带有ACL设置的数据浏览器的屏幕截图。 I have spent a lot of hours trying to figure this out and will appreciate any pointers / help. 我花了很多时间试图解决这个问题,并且会感谢您的指点/帮助。 Thanks! 谢谢! 在此处输入图片说明

Resolution: Credit:@Sarvesh: If you are using REST API to create Parse records and setting ACL with them, you will need to include the X-Parse-Session-Token. 解决方案:Credit:@Sarvesh:如果您使用REST API创建Parse记录并为其设置ACL,则需要包括X-Parse-Session-Token。

Addn'l info how to store some particular data for some particular parse user in android 有关如何在Android中为某些特定解析用户存储某些特定数据的附加信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM