Closed
Description
I'm using query.each() in my cloud code and am struggling to make it work with useMasterKey:true. error returned is "Error=Permission denied for action find on class ..."
Logging suggests my problem lies in the query.each() function
What is the correct syntax for using useMasterKey:true with query.each?
I've got other examples working such as ...
object.save(null,{useMasterKey:true})
and
query.find({useMasterKey:true,success:...
Here's the outline of the code with some of the detail commented out.
thanks in advance...
query3.each(
function(object){
...
object.save(null,{useMasterKey:true})
},
{
success: function() {
...
response.success("OK");
},
error: function(error) {
...
response.error("Failed");
}
}, {useMasterKey: true});
Metadata
Metadata
Assignees
Labels
No labels