9***@qq.com
9***@qq.com
  • 发布:2021-09-13 21:45
  • 更新:2022-07-14 20:27
  • 阅读:1865

#插件讨论# 【 uni-starter - DCloud前端团队 】权限校验未通过

分类:uni-app
关联插件: uni-starter

"stack": "Error: 权限校验未通过\n at http://localhost:8080/static/js/chunk-vendors.js:12838:89709\n at <anonymous>"

2021-09-13 21:45 负责人:无 分享
已邀请:
DCloud_uniCloud_JSON

DCloud_uniCloud_JSON

请详细描述你要咨询的问题。

  • 9***@qq.com (作者)

    解决了谢谢!

    2021-09-18 20:54

  • yezi03

    回复 9***@qq.com: 您好,请问这个问题是怎么解决的呢?

    2022-10-31 20:04

idcims

idcims

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"
}

  • 极兔兔

    重新创建uin-starter 和admin可以了,这次admin没关联到starter里面

    2022-07-14 21:00

该问题目前已经被锁定, 无法添加新回复