From 46a8323499ec09965ce8d2905ca19db3cbc965e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E7=BA=A2=E4=BF=9D?= Date: Tue, 27 Oct 2020 14:56:20 +0800 Subject: [PATCH] add permission config --- collection/opendb-mall-goods/collection.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/collection/opendb-mall-goods/collection.json b/collection/opendb-mall-goods/collection.json index bdf5b10..d7fa634 100644 --- a/collection/opendb-mall-goods/collection.json +++ b/collection/opendb-mall-goods/collection.json @@ -2,8 +2,8 @@ "schema": { "bsonType": "object", "required": ["goods_sn", "name", "remain_count", "month_sell_count", "total_sell_count", "comment_count", "is_real", "is_on_sale", "is_alone_sale", "is_best", "is_new", "is_hot"], - "permission": { - ".read": true, + "permission": { + ".read": "doc.is_on_sale == true", ".create": false, ".update": false, ".delete": false @@ -106,7 +106,10 @@ }, "seller_note": { "bsonType": "string", - "description": "商家备注,仅商家可见" + "description": "商家备注,仅商家可见", + "permission": { + ".read": false + } } } },