mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 06:38:19 +01:00
Merge pull request #7707 from renmaosheng/harbor-6838
Don't display password when calling api/users API.
This commit is contained in:
commit
58aed3dde9
@ -203,7 +203,10 @@ func (ua *UserAPI) List() {
|
|||||||
ua.SendInternalServerError(fmt.Errorf("failed to get users: %v", err))
|
ua.SendInternalServerError(fmt.Errorf("failed to get users: %v", err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
for i := range users {
|
||||||
|
user := &users[i]
|
||||||
|
user.Password = ""
|
||||||
|
}
|
||||||
ua.SetPaginationHeader(total, page, size)
|
ua.SetPaginationHeader(total, page, size)
|
||||||
ua.Data["json"] = users
|
ua.Data["json"] = users
|
||||||
ua.ServeJSON()
|
ua.ServeJSON()
|
||||||
|
Loading…
Reference in New Issue
Block a user