html52.com
我爱小程序-开发者交流社区

云数据库集合设置自定义安全规则设置后,where语句怎么调整都读不出数据,着急等?

数据集合

{ _id: '', _openid: '其它用户openid', friends: ['当前用户openid'] }

安全规则为:

{

    "read""doc._openid == auth.openid || auth.openid in doc.friends",

    "write""doc._openid == auth.openid || auth.openid in doc.friends"

}

where语句:

写法一:{ _openid:'{openid}', friends:_.elemMatch(_.eq('当前用户openid')) }

写法二:_.or([ { _openid: '{openid}' }, { friends: _.elemMatch(_.eq('当前用户openid')) } ])


问题:当集合设置自定义上述安全规则后,where语句怎么调整都读不出数据,请大神指点,多选啦!


评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付