收藏
回答

数据权限问题

框架类型 问题类型 终端类型 AppID 环境ID 基础库版本
小程序 Bug 微信安卓客户端 wxd9bf99b34cbc9425 listen-2gskorawde4c93ea 2.14.1

https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/database/security-rules.html

{

"read": "auth.openid == 'oEQLf4rd8w2C85Ly3B8FxXXyz8RA' || doc._openid == auth.openid",

"create": true,

"update": "auth.openid == 'oEQLf4rd8w2C85Ly3B8FxXXyz8RA' || doc._openid == auth.openid",

"delete": "auth.openid == 'oEQLf4rd8w2C85Ly3B8FxXXyz8RA' || doc._openid == auth.openid"

}

指定openid = 'oEQLf4rd8w2C85Ly3B8FxXXyz8RA'的用户或者记录创建者可查看修改删除, 此时只有指定的用户可以查看信息, 创建者查看报错

Error: errCode: -502003 database permission denied | errMsg: Permission denied

    at new s (VM1665 WAService.js:2)

    at Function.success (VM1665 WAService.js:2)

    at C (VM1665 WAService.js:2)

    at Object.success (VM1665 WAService.js:2)

    at Q (VM1665 WAService.js:2)

    at d (VM1665 WAService.js:2)

    at VM1665 WAService.js:2

    at A.<anonymous> (VM1663 asdebug.js:1)

    at C (VM1665 WAService.js:2)

    at VM1665 WAService.js:2

回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签