mirror of
https://github.com/rancher/norman.git
synced 2025-09-01 15:18:20 +00:00
Drop password fields from response
This commit is contained in:
@@ -364,8 +364,14 @@ func fieldMatchesOp(field types.Field, op Operation) bool {
|
||||
case Update:
|
||||
return field.Update
|
||||
case List:
|
||||
if field.Type == "password" {
|
||||
return false
|
||||
}
|
||||
return !field.WriteOnly
|
||||
case ListForCreate:
|
||||
if field.Type == "password" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
Reference in New Issue
Block a user