mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
public key bug and multiuser enhancement and server ip support and config file of client optimization
This commit is contained in:
@@ -140,7 +140,16 @@ func (s *BaseController) SetType(name string) {
|
||||
|
||||
func (s *BaseController) CheckUserAuth() {
|
||||
if s.controllerName == "client" {
|
||||
s.StopRun()
|
||||
if s.actionName == "add" {
|
||||
s.StopRun()
|
||||
return
|
||||
}
|
||||
if id := s.GetIntNoErr("id"); id != 0 {
|
||||
if id != s.GetSession("clientId").(int) {
|
||||
s.StopRun()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if s.controllerName == "index" {
|
||||
if id := s.GetIntNoErr("id"); id != 0 {
|
||||
|
Reference in New Issue
Block a user