q***@163.com
q***@163.com
  • 发布:2025-11-26 15:25
  • 更新:2025-11-26 15:25
  • 阅读:13

【报Bug】DB Schema read权限设置为 news_title != 'something' 不起作用

分类:uniCloud

产品分类: uniCloud/App

操作步骤:

预期结果:

实际结果:

bug描述:


    "bsonType": "object",  
    "required": ["news_title"],  
    "permission": {  
        "read": "'title2' != doc.news_title",  
        "create": true,  
        "update": true,  
        "delete": true  
    },  
    "properties": {  
        "_id": {  
            "description": "ID,系统自动生成"  
        },  
        "title": {  
            "bsonType": "string",  
            "title": "标题"  
        },  
        "cover": {  
            "bsonType": "file",  
            "title": "封面",  
            "fileMediaType": "image"  
        },  
        "content": {  
            "bsonType": "string",  
            "title": "内容"  
        },  
        "news_title": {  
            "bsonType": "string",  
            "title": "标题2"            
        }  
    }  
}```  

前端普通用户居然可以读到 news_title 为排除条件的记录,把 where 设置为 “news_title == 'title2'”,也完全可以读取出来,太令人困惑了。。。
2025-11-26 15:25 负责人:无 分享
已邀请:

要回复问题请先登录注册