refactor(wechat): 移除小程序模板获取的权限检查
权限检查已在中间件统一处理,此处重复检查已无必要
This commit is contained in:
parent
59c7471cad
commit
61c517eaf7
@ -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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user