secrets on review page show constant asterisks value

Signed-off-by: Stephen Glass <stephen@stephen.glass>
This commit is contained in:
Stephen Glass
2024-08-20 18:38:23 -04:00
committed by blam
parent 82a2a421c9
commit 9a0672a9c7
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-react': patch
---
Scaffolder review page shows static amount of asterisks for secret fields.
@@ -52,7 +52,10 @@ function processSchema(
}
}
if (definitionInSchema['ui:widget'] === 'password') {
if (
definitionInSchema['ui:widget'] === 'password' ||
definitionInSchema['ui:field']?.toLocaleLowerCase('en-us') === 'secret'
) {
return [[getLastKey(key), '******']];
}