且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Swift IOS8在Parse.com中更新用户

更新时间:2023-02-03 09:39:06

您没有使用要编辑的帐户登录. 您只能编辑当前帐户,而不能编辑PFUser表中的任何帐户. 这就是我在分析中发现的:

You're not logged in with the account which you want to edit. You can only edit the current account and not any account in the PFUser table. That's what I found on parse:

用户对象的安全性

Security For User Objects

默认情况下,PFUser类是安全的. PFUser中存储的数据可以 只能由该用户修改.默认情况下,仍可以读取数据 由任何客户.因此,某些PFUser对象已通过身份验证,可以通过 修改,而其他则为只读.

The PFUser class is secured by default. Data stored in a PFUser can only be modified by that user. By default, the data can still be read by any client. Thus, some PFUser objects are authenticated and can be modified, whereas others are read-only.

具体来说,您将无法调用任何保存或删除操作 除非PFUser是使用经过身份验证的方法获得的,否则, 如logIn或signUp.这样可以确保只有用户才能更改他们的 自己的数据.

Specifically, you are not able to invoke any of the save or delete methods unless the PFUser was obtained using an authenticated method, like logIn or signUp. This ensures that only the user can alter their own data.

请参见如何登录.