问题描述
首先,这是在 riderRequest 表中插入一行后,我的解析表的外观.插入后,我的公共写入" ACL默认为 User 表的objectId.
First of all, this is how my parse table looks like after inserting a row to riderRequest table. After inserting, my ACL for Public Write defaults to the objectId of the User table.
riderRequest 表
用户表
这是我的代码,将新行插入到我的 riderRequest 表中.
So this is my code that inserts the new row into my riderRequest table.
var riderRequest = PFObject(className: "riderRequest")
riderRequest["username"] = PFUser.currentUser()?.username
riderRequest["location"] = PFGeoPoint(latitude: latitude, longitude: longitude)
riderRequest.saveInBackgroundWithBlock { (success, error) -> Void in
if(success)
{
self.callUberButton.setTitle("Cancel Uber", forState: UIControlState.Normal)
}
else
{
self.displayAlert("Could not call uber", message: "Please try again later")
}
}
我的代码与修改ACL的值无关.我似乎无法弄清楚,为什么要修改ACL值?
My code has nothing to do with modifying the value of ACL.I cant seem to figure this out, why is the ACL value modified?
任何帮助将不胜感激.非常感谢您的帮助.
Any help would be greatly appreciated. Thank you so much for your help.
推荐答案
查看您的AppDelegate.很有可能是默认的ACL,它看起来像这样
Look in your AppDelegate. There's most likely a default ACL and it will look something like this
// Enable public read access by default, with any newly created PFObjects belonging to the current user
let defaultACL: PFACL = PFACL()
defaultACL.publicReadAccess = true
PFACL.setDefaultACL(defaultACL, withAccessForCurrentUser: true)
这篇关于解析Swift中的怪异错误,导致ACL写入权限更改为objectId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!