udpate: opendb-news-articles,需要根据文章状态判断用户是否有读取权限

This commit is contained in:
handongxun 2021-03-31 17:14:44 +08:00
parent 8d7756f8b7
commit 8350ca8e03

View File

@ -3,7 +3,7 @@
"bsonType": "object",
"required": ["user_id", "title", "content"],
"permission": {
"read": true,
"read": "doc.uid == auth.uid && doc.article_status == 0 || doc.article_status == 1",
"create": "auth.uid != null",
"update": "doc.uid == auth.uid",
"delete": "doc.uid == auth.uid"
@ -55,6 +55,7 @@
"bsonType": "int",
"title": "文章状态",
"description": "文章状态0 草稿箱 1 已发布",
"defaultValue": 0,
"enum": [
{
"value": 0,