【发布时间】:2015-10-13 06:03:04
【问题描述】:
我有两个班级;议程和活动。多个事件可以属于一个议程对象,并且是只读的以保护这些对象。所有用户都可以制作应该指向某个议程对象的事件。
在事件中,我有一个名为议程的列,它是指向议程的指针。
如果我试试这个:
var vetEvent = new Parse.Object("Events");
vetEvent.set('user', Parse.User.current());
vetEvent.set('type', 'unsubscribe');
vetEvent.set('agenda', agenda);
vetEvent.save().then(function(result){
console.log(result);
},function(error){
console.log(error);
});
结果是:
[{"error":{"code":119,"error":"This user is not allowed to perform the update operation on Agenda. You can change this setting in the Data Browser."}}]
实现这一目标的最佳方法是什么?
【问题讨论】:
-
尝试在你的 beforesave 事件中使用 cloudcode 和 'UseMasterKey',它应该可以通过所有的安全限制。
-
是的,当然可以,但你不觉得应该有更好的方法吗?
标签: javascript security parse-platform acl