File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ func (s *BaseController) Prepare() {
39
39
s .Ctx .Input .SetData ("client_id" , s .GetSession ("clientId" ).(int ))
40
40
s .Ctx .Input .SetParam ("client_id" , strconv .Itoa (s .GetSession ("clientId" ).(int )))
41
41
s .Data ["isAdmin" ] = false
42
+ s .Data ["username" ] = s .GetSession ("username" )
42
43
s .CheckUserAuth ()
43
44
} else {
44
45
s .Data ["isAdmin" ] = true
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ func (self *LoginController) Verify() {
43
43
if auth {
44
44
self .SetSession ("isAdmin" , false )
45
45
self .SetSession ("clientId" , v .Id )
46
+ self .SetSession ("username" , v .WebUserName )
46
47
return false
47
48
}
48
49
return true
Original file line number Diff line number Diff line change 42
42
{{if eq true .isAdmin}}
43
43
admin
44
44
{{else}}
45
- user
45
+ {{.username}}
46
46
{{end}}
47
47
</ strong >
48
48
</ span > < span class ="text-muted text-xs block "> system </ span > </ span >
You can’t perform that action at this time.
0 commit comments