mirror of
https://github.com/tiger1103/gfast.git
synced 2026-09-21 18:20:47 +00:00
权限判断完善
This commit is contained in:
@@ -27,7 +27,7 @@ func Auth(r *ghttp.Request) {
|
||||
}*/
|
||||
accessParams := r.GetStrings("accessParams")
|
||||
accessParamsStr := ""
|
||||
if len(accessParams) > 0 {
|
||||
if len(accessParams) > 0 && accessParams[0] != "undefined" {
|
||||
accessParamsStr = "?" + gstr.Join(accessParams, "&")
|
||||
}
|
||||
//获取登陆用户id
|
||||
@@ -48,7 +48,8 @@ func Auth(r *ghttp.Request) {
|
||||
}
|
||||
var menu *auth_rule.Entity
|
||||
for _, m := range menuList {
|
||||
if gstr.Equal(m.Name, url) {
|
||||
ms := gstr.SubStr(m.Name, 0, gstr.Pos(m.Name, "?"))
|
||||
if m.Name == url || ms == url {
|
||||
menu = m
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user