1
0
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:
Darren Shepherd
2018-02-09 18:02:01 -07:00
parent 722cedfe01
commit 63f413add2

View File

@@ -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