clsnull
clsnull
  • 发布:2023-03-07 12:39
  • 更新:2023-03-07 12:39
  • 阅读:123

【报Bug】连本地云函数查询成功, 云端函数提示无权限

分类:uniCloud

产品分类: uniCloud/腾讯云

示例代码:
getSubject() {  
                db.collection('subject').where({  
                    period: this.periodId  
                }).field('name as text, _id as value').get().then(res => {  
                    console.log(res)  
                    this.subjectList = res.result.data;  
                    this.subjectId = res.result.data[0]['value']  

                })  
            },

// 文档教程: subject.scherma.json
{
"bsonType": "object",
"required": ["period", "name", "fullName"],
"permission": {
"read": true,
"create": false,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"period": {
"bsonType": "int",
"title": "学段",
"enum": [{
"text": "小学",
"value": 1
}, {
"text": "初中",
"value": 2
}, {
"text": "高中",
"value": 3
}],
"componentForEdit": {
"name": "uni-data-select"
}
},
"name": {
"bsonType": "string",
"title": "学科简称",
"description": "学科简称"
},
"fullName": {
"bsonType": "string",
"title": "学科全称",
"description": "学科全称"
},
"route": {
"bsonType": "string",
"title": "拼音简写",
"description": "拼音简写"
},
"orderSort": {
"bsonType": "int",
"title": "排序",
"description": "排序",
"defaultValue": 0
},
"enabled": {
"bsonType": "bool",
"title": "状态",
"description": "状态",
"defaultValue": true
}
}
}

操作步骤:

就调用getSubject()方法, 连本地云函数查询成功, 云端函数提示无权限

预期结果:

云端函数查询成功

实际结果:

云端函数提示无权限

bug描述:

就调用getSubject()方法, 连本地云函数查询成功, 云端函数提示无权限

2023-03-07 12:39 负责人:无 分享
已邀请:

要回复问题请先登录注册