From 74df0819d609add131503dcf7a7da7d4c678b534 Mon Sep 17 00:00:00 2001 From: cg33 Date: Sun, 10 May 2020 22:30:08 +0800 Subject: [PATCH] fix(permission): permission check error --- plugins/admin/models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/admin/models/user.go b/plugins/admin/models/user.go index 6b584d524..6c6490f50 100644 --- a/plugins/admin/models/user.go +++ b/plugins/admin/models/user.go @@ -80,7 +80,7 @@ func (t UserModel) HasMenu() bool { // IsSuperAdmin check the user model is super admin or not. func (t UserModel) IsSuperAdmin() bool { for _, per := range t.Permissions { - if len(per.HttpPath) > 0 && per.HttpPath[0] == "*" { + if len(per.HttpPath) > 0 && per.HttpPath[0] == "*" && per.HttpMethod[0] == "" { return true } }