mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-09-20 11:33:01 +08:00
udpate: opendb-news-articles,需要根据文章状态判断用户是否有读取权限
This commit is contained in:
parent
8d7756f8b7
commit
8350ca8e03
@ -3,7 +3,7 @@
|
|||||||
"bsonType": "object",
|
"bsonType": "object",
|
||||||
"required": ["user_id", "title", "content"],
|
"required": ["user_id", "title", "content"],
|
||||||
"permission": {
|
"permission": {
|
||||||
"read": true,
|
"read": "doc.uid == auth.uid && doc.article_status == 0 || doc.article_status == 1",
|
||||||
"create": "auth.uid != null",
|
"create": "auth.uid != null",
|
||||||
"update": "doc.uid == auth.uid",
|
"update": "doc.uid == auth.uid",
|
||||||
"delete": "doc.uid == auth.uid"
|
"delete": "doc.uid == auth.uid"
|
||||||
@ -55,6 +55,7 @@
|
|||||||
"bsonType": "int",
|
"bsonType": "int",
|
||||||
"title": "文章状态",
|
"title": "文章状态",
|
||||||
"description": "文章状态:0 草稿箱 1 已发布",
|
"description": "文章状态:0 草稿箱 1 已发布",
|
||||||
|
"defaultValue": 0,
|
||||||
"enum": [
|
"enum": [
|
||||||
{
|
{
|
||||||
"value": 0,
|
"value": 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user