mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-12-26 22:41:15 +08:00
add permission
This commit is contained in:
parent
2c211d4c96
commit
fdac3feb1d
@ -2,6 +2,12 @@
|
||||
"schema": {
|
||||
"bsonType": "object",
|
||||
"required": ["name"],
|
||||
"permission": {
|
||||
".read": true,
|
||||
".create": false,
|
||||
".update": false,
|
||||
".delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "存储文档 ID(文章 ID),系统自动生成"
|
||||
|
@ -2,6 +2,12 @@
|
||||
"schema": {
|
||||
"bsonType": "object",
|
||||
"required": ["goods_id", "user_id", "content"],
|
||||
"permission": {
|
||||
".read": true,
|
||||
".create": "auth.uid != null",
|
||||
".update": "doc.user_id == auth.uid",
|
||||
".delete": "doc.user_id == auth.uid"
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "存储文档 ID(文章 ID),系统自动生成"
|
||||
|
@ -18,7 +18,10 @@
|
||||
},
|
||||
"user_id": {
|
||||
"bsonType": "string",
|
||||
"description": "评论者ID,参考`uni-id-users` 表"
|
||||
"description": "评论者ID,参考`uni-id-users` 表",
|
||||
"forceDefaultValue": {
|
||||
"$env": "uid"
|
||||
}
|
||||
},
|
||||
"comment_content": {
|
||||
"bsonType": "string",
|
||||
|
@ -2,6 +2,12 @@
|
||||
"schema": {
|
||||
"bsonType": "object",
|
||||
"required": ["content", "count"],
|
||||
"permission": {
|
||||
".read": true,
|
||||
".create": false,
|
||||
".update": false,
|
||||
".delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
|
@ -1,7 +1,13 @@
|
||||
{
|
||||
"schema": {
|
||||
"bsonType": "object",
|
||||
"required": ["user_id", "content"],
|
||||
"required": ["content"],
|
||||
"permission": {
|
||||
".read": false,
|
||||
".create": false,
|
||||
".update": false,
|
||||
".delete": false
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
|
Loading…
Reference in New Issue
Block a user