diff --git a/collection/opendb-news-articles/collection.json b/collection/opendb-news-articles/collection.json index 3f05f62..0bea48c 100644 --- a/collection/opendb-news-articles/collection.json +++ b/collection/opendb-news-articles/collection.json @@ -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,