diff --git a/collection/opendb-news-comments/collection.json b/collection/opendb-news-comments/collection.json index 2ab1dec..4401d46 100644 --- a/collection/opendb-news-comments/collection.json +++ b/collection/opendb-news-comments/collection.json @@ -4,7 +4,7 @@ "required": ["article_id", "user_id", "comment_content", "like_count", "comment_type", "reply_user_id", "reply_comment_id"], "permission": { ".read": true, - ".create": "auth.uid != null", + ".create": "auth.uid != null && get(`database.opendb-news-article.${doc.article_id}`).comment_status == 1", ".update": "doc.uid == auth.uid", ".delete": "doc.uid == auth.uid" },