adds admin: { } options to fields, allows for field disabling

This commit is contained in:
James
2020-07-09 14:30:29 -04:00
parent 5870e7cde9
commit 356113fbba
8 changed files with 73 additions and 25 deletions

View File

@@ -3,13 +3,17 @@ module.exports = [
name: 'enableAPIKey',
type: 'checkbox',
defaultValue: false,
hidden: 'admin',
admin: {
disable: true,
},
},
{
name: 'apiKey',
type: 'text',
minLength: 24,
maxLength: 48,
hidden: 'admin',
admin: {
disable: true,
},
},
];

View File

@@ -6,16 +6,22 @@ module.exports = [
label: 'Email',
type: 'email',
validate: validations.email,
hidden: 'admin',
admin: {
disable: true,
},
},
{
name: 'resetPasswordToken',
type: 'text',
hidden: true,
admin: {
disable: true,
},
},
{
name: 'resetPasswordExpiration',
type: 'date',
hidden: true,
admin: {
disable: true,
},
},
];