Adding validator for uiMetadata.
This commit is contained in:
parent
4952747ae9
commit
4d428f33f6
|
@ -208,6 +208,11 @@ export function roleValidator() {
|
|||
name: Joi.string()
|
||||
.regex(/^[a-zA-Z0-9_]*$/)
|
||||
.required(),
|
||||
uiMetadata: Joi.object({
|
||||
displayName: OPTIONAL_STRING,
|
||||
color: OPTIONAL_STRING,
|
||||
description: OPTIONAL_STRING,
|
||||
}).optional(),
|
||||
// this is the base permission ID (for now a built in)
|
||||
permissionId: Joi.string()
|
||||
.valid(...Object.values(permissions.BuiltinPermissionID))
|
||||
|
|
Loading…
Reference in New Issue