From 471019c764ad5625401b26f27e3762f41115897e Mon Sep 17 00:00:00 2001 From: chenruilong Date: Tue, 25 Jun 2024 20:34:40 +0800 Subject: [PATCH] update: uni-cms-articles.schema.ext.js --- collection/uni-cms-articles/schema.ext.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/collection/uni-cms-articles/schema.ext.js b/collection/uni-cms-articles/schema.ext.js index b6b7e1c..50ca259 100644 --- a/collection/uni-cms-articles/schema.ext.js +++ b/collection/uni-cms-articles/schema.ext.js @@ -180,6 +180,10 @@ module.exports = { throw new Error('请在 uni-cms 配置文件中配置 clientAppIds 字段后访问,详见:https://uniapp.dcloud.net.cn/uniCloud/uni-cms.html#uni-cms-config') } + if (isAdmin && config.clientAppIds && config.clientAppIds.includes(clientInfo.appId)) { + throw new Error('uni-cms 配置文件中的 clientAppIds 字段请勿添加管理端的 appid,请移除后重试') + } + // 如果clientAppIds字段未配置或当前appId不在clientAppIds中,则返回 if (!config.clientAppIds || !config.clientAppIds.includes(clientInfo.appId)) return