- user GetUserTag in jxcontext.Context.GetUserName
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
type IAuther interface {
|
||||
GetAuthID() string
|
||||
GetAuthType() string
|
||||
GetUserTag() string
|
||||
}
|
||||
|
||||
type Context struct {
|
||||
@@ -96,7 +97,7 @@ func New(rootTask tasksch.ITask, token string, w http.ResponseWriter, r *http.Re
|
||||
func (ctx *Context) GetUserName() string {
|
||||
userName := ctx.token
|
||||
if ctx.userInfo != nil {
|
||||
userName = ctx.userInfo.GetAuthID()
|
||||
userName = ctx.userInfo.GetUserTag()
|
||||
}
|
||||
if len(userName) > MaxUserNameLen {
|
||||
userName = userName[:MaxUserNameLen]
|
||||
|
||||
Reference in New Issue
Block a user