Expand description
§autumn-admin-plugin
Out-of-the-box admin panel plugin for autumn-web applications.
Provides auto-generated CRUD views, search, filtering, and audit trails
for any model registered via the AdminPlugin builder. The UI is
server-rendered with Maud + HTMX — no JS build step required.
§Quick start
ⓘ
use autumn_admin_plugin::{prelude::*, AdminPlugin};
autumn_web::app()
.plugin(
AdminPlugin::new()
.register(ProjectAdmin::default())
.register(TicketAdmin::default()),
)
.routes(routes![...])
.run()
.await;§Security
The plugin requires the "admin" role in the session by default. Override
with AdminPlugin::require_role (pass None to disable; not recommended
for production).
§Naming convention
First-party plugin: autumn-<name>-plugin.
Modules§
- experiments
- Admin panel model for
autumn_experiments. - feature_
flags - Admin panel model for
autumn_feature_flags. - prelude
- Common downstream imports for implementing admin models.
- tokens
- Admin panel model for scoped API tokens (
api_tokens).
Structs§
- Admin
Action - A named bulk action that can be performed on selected records.
- Admin
Field - Metadata for a single model field.
- Admin
History Entry - A single entry in the admin History pane for an opted-in model.
- Admin
History Page - Paginated history result for the admin History pane.
- Admin
Impersonation - Request extractor resolving the impersonation banner for the current
session, or
Nonewhen the session is not impersonating. - Admin
Import Error - A single parse/validation error from an admin CSV import.
- Admin
Import Report - Summary of a completed (or dry-run) admin CSV import.
- Admin
Plugin - The admin panel plugin.
- Admin
Registry - Holds all registered admin models, keyed by their URL slug.
- Impersonation
Banner - Everything the impersonation banner needs to render.
- List
Params - Parameters for a list query.
- List
Result - Result of a list query, containing records and pagination metadata.
- Select
Option - A single option in a
AdminFieldKind::Selectdropdown.
Enums§
- Admin
Error - Error type for admin operations.
- Admin
Field Kind - The kind of a model field, used to select the appropriate form widget.
- Admin
Import RowResult - The outcome of processing a single imported CSV row.
- CsvImport
Mode - Mode for an admin CSV import operation.
- Sort
Direction - Sort direction for list queries.
Constants§
- IMPERSONATION_
BANNER_ CSS - Styles for the impersonation banner (
impersonation_banner).
Traits§
- Admin
Model - The core trait that enables a model to be managed in the admin panel.
Functions§
- dispatch_
restore_ purge_ or_ unhandled - Dispatch the built-in
"restore"/"purge"bulk actions and the fallback error for anything else. - impersonation_
banner - Render the persistent “Viewing as … — Stop impersonating” banner.
- impersonation_
banner_ for - Render the impersonation banner for the current request, or
Nonewhen the session is not impersonating.
Type Aliases§
- Admin
Future - Type alias for the boxed future returned by async
AdminModelmethods.