https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/database/security-rules.html
问题描述:
现有如下集合promises:
{
_id: string,
peoples: string[], // 成员 openid 列表
}
给集合添加数据库安全规则如下:
{
"read": "auth.openid in doc.peoples",
"write": "doc._openid == auth.openid"
}
查询集合promises中的数据,报Permission denied,请指点
"read": "auth.openid in get('database.promises').peoples"
补充一下 peoples字段里确实已包含当前用户openid,查询依然报无权限