我有一个名为 Project 的类,我为它创建了一个 Parse.Role 以获得读/写权限。
以下是我创建角色的方式:
var roleName = "hasSound_" + ident;
var projectRole = new Parse.Role(roleName, new Parse.ACL());
projectRole.getUsers().add(creator);
return projectRole.save().then(function(role) {
var acl = new Parse.ACL();
acl.setReadAccess(role, true); //give read access to Role
acl.setWriteAccess(role, true); //give write access to Role
project.setACL(acl);
project.save();
});
这是我在尝试创建 Parse.Role 时收到的错误请求:
Mar 04 14:39:32 ancient-lake-41070 heroku/router: at=info method=POST path="/parse/classes/_Role" host=ancient-lake-41070.herokuapp.com request_id=82af3849-842a-406f-8a4b-5f573e08a1e1 fwd="54.145.36.110" dyno=web.1 connect=0ms service=6ms status=400 bytes=578