mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 13:40:24 +08:00
增加恢复模式
This commit is contained in:
@@ -13,6 +13,11 @@ type UserShouldAuth struct {
|
||||
}
|
||||
|
||||
func (this *UserShouldAuth) BeforeAction(actionPtr actions.ActionWrapper, paramName string) (goNext bool) {
|
||||
if teaconst.IsRecoverMode {
|
||||
actionPtr.Object().RedirectURL("/recover")
|
||||
return false
|
||||
}
|
||||
|
||||
this.action = actionPtr.Object()
|
||||
|
||||
// 安全相关
|
||||
@@ -34,7 +39,7 @@ func (this *UserShouldAuth) BeforeAction(actionPtr actions.ActionWrapper, paramN
|
||||
return true
|
||||
}
|
||||
|
||||
// 存储用户名到SESSION
|
||||
// StoreAdmin 存储用户名到SESSION
|
||||
func (this *UserShouldAuth) StoreAdmin(adminId int64, remember bool) {
|
||||
// 修改sid的时间
|
||||
if remember {
|
||||
|
||||
Reference in New Issue
Block a user