"stack": "Error: 权限校验未通过\n at http://localhost:8080/static/js/chunk-vendors.js:12838:89709\n at <anonymous>"
- 发布:2021-09-13 21:45
- 更新:2022-07-14 20:27
- 阅读:1865
schema 里的权限要给对
"permission": {
"create": "auth.uid != null",
"delete": "doc.user_id == auth.uid",
"read": "doc.user_id == auth.uid && doc.article_status == 0 || doc.article_status == 1",
"update": "doc.user_id == auth.uid"
}
里面那个read里可以看说明文档来设置: https://uniapp.dcloud.io/uniCloud/schema?id=permission
20:24:48.989 [本地调试]"[clientDB请求]表名:opendb-news-articles,uni-id-users"
20:24:49.392 [本地调试]"PERMISSION_ERROR: 权限校验未通过"
opendb-news-articles.schema.json 权限
"permission": {
"create": "auth.uid != null",
"delete": "doc.user_id == auth.uid",
"read": "doc.user_id == auth.uid && doc.article_status == 0 || doc.article_status == 1",
"update": "doc.user_id == auth.uid"
},
user表
"permission": {
"read": "'READ_UNI_ID_USERS' in auth.permission",
"create": "'CREATE_UNI_ID_USERS' in auth.permission",
"update": "'UPDATE_UNI_ID_USERS' in auth.permission",
"delete": "'DELETE_UNI_ID_USERS' in auth.permission"
}
9***@qq.com (作者)
解决了谢谢!
2021-09-18 20:54
yezi03
回复 9***@qq.com: 您好,请问这个问题是怎么解决的呢?
2022-10-31 20:04