import { AdminAction } from '../'; export interface AdminEntityOptions { /** * List or a single item of user roles required to have access to the admin page of this entity. * This value heavily abuses the @CurrentUser functionality provided by 'routing-controllers' by @pleerock. * Be sure to enable it if you want the roles management to work correctly. * @see https://fulminate-js.github.io/docs#currentUser */ allowedRoles?: string | string[]; /** * List or a single item of user roles that are disallowed to have access to the admin page of this entity. * This value heavily abuses the @CurrentUser functionality provided by 'routing-controllers' by @pleerock. * Be sure to enable it if you want the roles management to work correctly. * This option interferes with 'allowedRoles' and overrides its values. * @see https://fulminate-js.github.io/docs#currentUser */ disallowedRoles?: string | string[]; /** * List or a single item of allowed actions that will be given to the user on the admin page. * Defaults to 'all' meaning the user will have access to all the features provided by the admin. */ allowedActions?: AdminAction | AdminAction[]; /** * List or a single item of disallowed actions that will be given to the user on the admin page. * This option interferes with 'allowedActions' and overrides its values. */ disallowedActions?: AdminAction | AdminAction[]; /** * Defines if link to administration of this entity should be shown in navigation bar of admin page. * Defaults to true. */ showInMenu?: boolean; /** * Defines label to be displayed in the menu. Only works when showInMenu is set to true. * This label is ONLY applied to the menu. */ menuLabel?: string; /** * Fields of current entity that should be available for administration. */ fields?: object; /** * Metadata for subentities marked with @NestedAdmin(). */ subEntities?: object; /** * Label to be displayed for the entity. */ label?: string; /** * Entity name. This value is injected automatically. */ entityName?: string; /** * Searchable entities have search logic enabled. * Defaults to false. */ searchable?: boolean; /** * If set to true, this entity will be available to be shown in the list of related entity. * NOTE: this option still ignores one-to-many relations and entities not decorated with @AdminEntity(). * Defaults to true. */ showInRelatedList?: boolean; /** * Mark table as a pivot table to make the admin render views and forms of the joint entity * instead of this one. * Defaults to false. */ pivot?: boolean; /** * Custom URL to render for list view. */ customListUrl?: string; /** * Custom URL to render for create view. */ customCreateUrl?: string; }