From 09d18605c4ce2a0e699e3b4b8f64aa78b722cbb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=96=B9=E6=88=90?= Date: Wed, 29 Oct 2025 22:28:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor(wechat):=20=E7=A7=BB=E9=99=A4=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=A8=A1=E6=9D=BF=E8=8E=B7=E5=8F=96=E7=9A=84?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 权限检查已在中间件统一处理,此处重复检查已无必要 --- internal/api/wechat/mini_template.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/internal/api/wechat/mini_template.go b/internal/api/wechat/mini_template.go index dc0b0f8..2605569 100644 --- a/internal/api/wechat/mini_template.go +++ b/internal/api/wechat/mini_template.go @@ -72,16 +72,6 @@ func (h *handler) GetTemplate() core.HandlerFunc { return } - // 检查是否有权限访问该小程序 - if ctx.SessionUserInfo().IsSuper != 1 && miniProgram.AdminID != ctx.SessionUserInfo().Id { - ctx.AbortWithError(core.Error( - http.StatusForbidden, - code.ServerError, - "无权限访问该小程序", - )) - return - } - // 检查模板ID是否存在 if miniProgram.TemplateID == "" { ctx.AbortWithError(core.Error(