3***@qq.com
3***@qq.com
  • 发布:2025-01-09 13:37
  • 更新:2025-01-09 13:37
  • 阅读:91

uni-id-users定义read:"doc.status == 0" 返回权限校验未通过,参与权限校验的集合:[uni-id-users,uni-id-roles]

分类:uniCloud

针对uni-id-users中设置了 read 权限:
"permission": {
"read": "doc.status == 0",
"create": true,
"update": true,
"delete": true
},

读取user list的时候响应如下:

{"success":true,"data":{"code":"PERMISSION_ERROR","errCode":"PERMISSION_ERROR","message":"权限校验未通过,参与权限校验的集合:[uni-id-users,uni-id-roles],请参考文档:https://uniapp.dcloud.net.cn/uniCloud/schema.html#handler-permission-error","errMsg":"权限校验未通过,参与权限校验的集合:[uni-id-users,uni-id-roles],请参考文档:https://uniapp.dcloud.net.cn/uniCloud/schema.html#handler-permission-error","systemInfo":[]},"header":{......}}

在 uni-id-roles中的权限:
"permission": {
"read": true,
"create": true,
"update": true,
"delete": true
},

如果将 uni-id-users 中permission 设置为true,就没问题
"permission":
"read": true,
"create": true,
"update": true,
"delete": true
},

请问这是为什么?

2025-01-09 13:37 负责人:无 分享
已邀请:

要回复问题请先登录注册