From 5ebf45608e511c57224fcd21604af74908155b9b Mon Sep 17 00:00:00 2001 From: Bruno Date: Wed, 22 Jan 2025 11:58:30 +0100 Subject: [PATCH] fix(entityManifest): admin props not displayed in manifest, Closes #269 --- packages/core/manifest/src/constants.ts | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/core/manifest/src/constants.ts b/packages/core/manifest/src/constants.ts index 8ef10863..f4bd8b04 100644 --- a/packages/core/manifest/src/constants.ts +++ b/packages/core/manifest/src/constants.ts @@ -29,6 +29,21 @@ export const DEFAULT_IMAGE_SIZES: ImageSizesObject = { } } +export const AUTHENTICABLE_PROPS: PropertyManifest[] = [ + { + name: 'email', + type: PropType.Email, + hidden: true, + validation: { isNotEmpty: true } + }, + { + name: 'password', + type: PropType.Password, + hidden: true, + validation: { isNotEmpty: true } + } +] + // Admin entity. export const DEFAULT_ADMIN_CREDENTIALS = { email: 'admin@manifest.build', @@ -41,7 +56,7 @@ export const ADMIN_ENTITY_MANIFEST: EntityManifest = { authenticable: true, nameSingular: 'admin', namePlural: 'admins', - properties: [], + properties: AUTHENTICABLE_PROPS, relationships: [], belongsToMany: [], policies: { @@ -53,21 +68,6 @@ export const ADMIN_ENTITY_MANIFEST: EntityManifest = { } } -export const AUTHENTICABLE_PROPS: PropertyManifest[] = [ - { - name: 'email', - type: PropType.Email, - hidden: true, - validation: { isNotEmpty: true } - }, - { - name: 'password', - type: PropType.Password, - hidden: true, - validation: { isNotEmpty: true } - } -] - // Reserved words that are not considered as filters. export const QUERY_PARAMS_RESERVED_WORDS = [ 'page',