MM-10980: Conditionally filteres User json properties. (#9018)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
e51ae39766
Коммит
56ba06c016
@@ -154,7 +154,11 @@ func getUserByUsername(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
if c.HandleEtag(etag, "Get User", w, r) {
|
||||
return
|
||||
} else {
|
||||
c.App.SanitizeProfile(user, c.IsSystemAdmin())
|
||||
if c.Session.UserId == user.Id {
|
||||
user.Sanitize(map[string]bool{})
|
||||
} else {
|
||||
c.App.SanitizeProfile(user, c.IsSystemAdmin())
|
||||
}
|
||||
w.Header().Set(model.HEADER_ETAG_SERVER, etag)
|
||||
w.Write([]byte(user.ToJson()))
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user