From eaae4a219b3f9f270cad1fa47d5a7185418514e6 Mon Sep 17 00:00:00 2001 From: cg33 Date: Tue, 15 Sep 2020 21:27:09 +0800 Subject: [PATCH] fix(admin): info table display error --- modules/language/en.go | 1 + plugins/admin/models/user.go | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/language/en.go b/modules/language/en.go index cf9281816..ec0328b67 100644 --- a/modules/language/en.go +++ b/modules/language/en.go @@ -15,6 +15,7 @@ var en = LangSet{ "updatedat": "updatedAt", "path": "path", "new": "New", + "filter": "Filter", "action": "Action", "toggle dropdown": "Toggle Dropdown", "delete": "Delete", diff --git a/plugins/admin/models/user.go b/plugins/admin/models/user.go index ae680ae8f..5552eea96 100644 --- a/plugins/admin/models/user.go +++ b/plugins/admin/models/user.go @@ -122,16 +122,16 @@ func (t UserModel) CheckPermissionByUrlMethod(path, method string, formParams ur return true } + if path == "" { + return false + } + logoutCheck, _ := regexp.Compile(config.Url("/logout") + "(.*?)") if logoutCheck.MatchString(path) { return true } - if path == "" { - return false - } - if path != "/" && path[len(path)-1] == '/' { path = path[:len(path)-1] }