-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from mnfst/269-admin-panel-cannot-manage-admins
🐛 fix(entityManifest): admin props not displayed in manifest
- Loading branch information
Showing
2 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'manifest': patch | ||
--- | ||
|
||
fixed admins cannot be managed in admin panel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: '[email protected]', | ||
|
@@ -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', | ||
|