mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 14:47:38 +01:00
Don't display password when calling api/users API.
This change fixes github issue 6838 Signed-off-by: Steven Ren <stevenr@stevenr-a01.vmware.com>
This commit is contained in:
parent
78aea0920d
commit
8311ff729a
@ -203,7 +203,10 @@ func (ua *UserAPI) List() {
|
||||
ua.SendInternalServerError(fmt.Errorf("failed to get users: %v", err))
|
||||
return
|
||||
}
|
||||
|
||||
for i := range users {
|
||||
user := &users[i]
|
||||
user.Password = ""
|
||||
}
|
||||
ua.SetPaginationHeader(total, page, size)
|
||||
ua.Data["json"] = users
|
||||
ua.ServeJSON()
|
||||
|
Loading…
Reference in New Issue
Block a user