Cloud Firestore security rules: how to check is property exists?

前端 未结 1 1027
忘掉有多难
忘掉有多难 2020-12-21 15:59

I need to check is property exists in document in store. allow update, delete: if resource.data.uid; in code above i have error \"Property uid is undefined on o

相关标签:
1条回答
  • 2020-12-21 16:44

    To check if the document contains a specific field, I use in:

    allow update, delete: if 'uid' in resource.data;
    
    0 讨论(0)
提交回复
热议问题