What does the Master Key in Parse Cloud?

后端 未结 1 1015
一向
一向 2021-01-06 10:13

Could somebody explain me in brief that what does the master key within Parse Cloud Code?

Is it possible that a recently implemented CC function (which

相关标签:
1条回答
  • 2021-01-06 10:27

    The master key overrides all security, such as ACL or Class-based permissions. It is like the "root" password.

    You should invoke it only when needed, because all methods for the current request after it is enabled with Parse.Cloud.useMasterKey(); will use the master key.

    You can selectively use it by passing options to the individual query/save/etc methods.

    query.find({ useMasterKey: true }).then(function(results) { // ...
    
    object.save(null, { useMasterKey: true }).then( // ...
    
    0 讨论(0)
提交回复
热议问题