mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-01-02 09:06:37 +08:00
增加操作日志查看界面
This commit is contained in:
@@ -114,6 +114,11 @@ func (this *UserMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam
|
||||
"name": "系统设置",
|
||||
"icon": "setting",
|
||||
},
|
||||
{
|
||||
"code": "log",
|
||||
"name": "操作日志",
|
||||
"icon": "history",
|
||||
},
|
||||
}
|
||||
|
||||
action.Data["teaTitle"] = teaconst.ProductNameZH
|
||||
|
||||
@@ -2,9 +2,9 @@ package helpers
|
||||
|
||||
import (
|
||||
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/utils/numberutils"
|
||||
"github.com/iwind/TeaGo/actions"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type UserShouldAuth struct {
|
||||
@@ -25,7 +25,7 @@ func (this *UserShouldAuth) BeforeAction(actionPtr actions.ActionWrapper, paramN
|
||||
}
|
||||
|
||||
// 存储用户名到SESSION
|
||||
func (this *UserShouldAuth) StoreAdmin(adminId int, remember bool) {
|
||||
func (this *UserShouldAuth) StoreAdmin(adminId int64, remember bool) {
|
||||
// 修改sid的时间
|
||||
if remember {
|
||||
cookie := &http.Cookie{
|
||||
@@ -54,7 +54,7 @@ func (this *UserShouldAuth) StoreAdmin(adminId int, remember bool) {
|
||||
}
|
||||
this.action.AddCookie(cookie)
|
||||
}
|
||||
this.action.Session().Write("adminId", strconv.Itoa(adminId))
|
||||
this.action.Session().Write("adminId", numberutils.FormatInt64(adminId))
|
||||
}
|
||||
|
||||
func (this *UserShouldAuth) IsUser() bool {
|
||||
|
||||
Reference in New Issue
Block a user