schema权限:
"permission": {
"read": "doc.customer_id == auth.uid && 'customer' in auth.role",
"create": "'customer' in auth.role",
"update": "doc.customer_id == auth.uid && 'customer' in auth.role",
"delete": "doc.customer_id == auth.uid && 'customer' in auth.role"
},
unicloud-db的where语句
const collectionList = ref([db.collection("sys-basic-school").where("customer_id==$cloudEnv_uid").getTemp(), db.collection("uni-id-users").field(
"_id, username, nickname").getTemp()])
需求:如果是超管登录,可以查看所有学校,如果是某个客户登录,则查看这个客户下的学校。where语句该怎么写?哪位同学指点一下?
0 个回复