pub fn with_cms_admin_access(
router: Router,
no_access_url: impl Into<String>,
) -> RouterExpand description
Gate the CMS-admin router on the cms_admin.access codename.
A logged-in tenant user is allowed through only when:
- they’re a superuser, OR
- one of their roles grants the
cms_admin.accesscodename.
Otherwise the request is redirected to no_access_url (defaults
to /cms-admin/no-access) so the user gets a friendly “you’re
signed in but not allowed here” page instead of an empty 403.
Tri-dialect. Resolves the user via the framework’s
SessionUser extractor. Anonymous requests pass through unchanged —
pair this with with_login_required above so that hits the login
flow first.