Skip to content

Commit

Permalink
fix(permission): permission check error
Browse files Browse the repository at this point in the history
  • Loading branch information
cg33 committed May 10, 2020
1 parent f34cdd9 commit 74df081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/admin/models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 74df081

Please sign in to comment.