From 8350ca8e03026045941f799b1adb7335a682166b Mon Sep 17 00:00:00 2001 From: handongxun Date: Wed, 31 Mar 2021 17:14:44 +0800 Subject: [PATCH] =?UTF-8?q?udpate:=20opendb-news-articles=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=A0=B9=E6=8D=AE=E6=96=87=E7=AB=A0=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=88=A4=E6=96=AD=E7=94=A8=E6=88=B7=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=9C=89=E8=AF=BB=E5=8F=96=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- collection/opendb-news-articles/collection.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,