云开发数据库权限设置提示错误Error: InvalidParameter, rule inva?
发布于 7 年前 作者 na49 14645 次浏览 来自 官方Issues

为什么设置提示错误?哪里设置不对吗

{
"read": true,
"create": "doc._openid== auth.openid",
"update": "doc._openid== auth.openid || get('database.user.${auth.openid}').isManager", 
"delete": "doc._openid== auth.openid || get('database.user.${auth.openid}').isManager"
}

user表

1 回复

你写错啦,要这么写,注意标点符号背后不同的含义

{
"read": true,
"create": "doc._openid== auth.openid",
"update": "doc._openid== auth.openid || get(`database.user.${auth.openid}`).isManager", 
"delete": "doc._openid== auth.openid || get(`database.user.${auth.openid}`).isManager"
}
回到顶部