refactor(wechat): 移除小程序模板获取的权限检查

权限检查已在中间件统一处理,此处重复检查已无必要
This commit is contained in:
邹方成 2025-10-29 22:28:25 +08:00
parent 59c7471cad
commit 61c517eaf7

View File

@ -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(