mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-01 01:02:12 +08:00
delete user session when admin login
This commit is contained in:
1 parent
883dd07d86
commit
614d81f374
1 file changed
+2
@@ -22,6 +22,8 @@ func (self *LoginController) Verify() {
|
||||
var auth bool
|
||||
if self.GetString("password") == beego.AppConfig.String("web_password") && self.GetString("username") == beego.AppConfig.String("web_username") {
|
||||
self.SetSession("isAdmin", true)
|
||||
self.DelSession("clientId")
|
||||
self.DelSession("username")
|
||||
auth = true
|
||||
server.Bridge.Register.Store(common.GetIpByAddr(self.Ctx.Input.IP()), time.Now().Add(time.Hour*time.Duration(2)))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user