Expand description
AdminRegistry — per-plugin grouping of registered models.
The registry records which plugin owns each model so the sidebar
nav can be built as a tree: plugin → [model, model, ...].
§Usage
[AdminPlugin::register] calls AdminRegistry::register internally,
passing Plugin::name() as the plugin identifier. The rendered shell
calls AdminRegistry::apps to get the sorted, permission-filtered
sidebar tree.
§Auto-discovery
AdminRegistry::apps synthesises a default AdminRegistration for
every model in the global model registry that does NOT have an explicit
registration. The label comes from ModelMeta::display (which reflects
Model::DISPLAY) and the icon from ModelMeta::icon (Model::ICON).
Explicit registrations override the synthesised defaults — same table
name means the explicit entry wins.
§Permission gating
Today, AdminRegistry::apps passes every entry through for any staff
user — matching the current baseline behaviour. When umbral-permissions
lands (gap 33), add a view_<table> permission check per entry and
filter out models the viewer may not see.
Structs§
- Admin
Registration - One registered model entry: the display config plus metadata.
- Admin
Registry - Central registry that maps
table_name → AdminRegistration. - App
- One plugin’s group in the sidebar tree.