#1127: hide user e-mail when API caller isn't signed in
This commit is contained in:
parent
ccf17a6ecb
commit
4cbbaefd82
2 changed files with 6 additions and 0 deletions
|
@ -68,5 +68,10 @@ func GetUserInfo(ctx *middleware.Context) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Hide user e-mail when API caller isn't signed in.
|
||||
if !ctx.IsSigned {
|
||||
u.Email = ""
|
||||
}
|
||||
ctx.JSON(200, &api.User{u.Id, u.Name, u.FullName, u.Email, u.AvatarLink()})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue