feat(companysetting): add writeonly column and mask values for GUI
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
function shapeSetting(row) {
|
||||
function shapeSetting(row, { exposeValue = false } = {}) {
|
||||
const writeonly = Boolean(row.writeonly);
|
||||
return {
|
||||
key: row.key,
|
||||
value: row.value,
|
||||
value: writeonly && !exposeValue ? '***' : row.value,
|
||||
frontend: Boolean(row.frontend),
|
||||
writeonly,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user