From ddbb7d51bc0b5600b88dd41795f9583867bdf7d5 Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Fri, 13 Nov 2026 10:46:00 +0100 Subject: [PATCH] docs: remove retired admin route example (#373) --- docs/auth-roles.md | 18 +++++++++++++++--- skills/ui-unknown-route/SKILL.md | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/auth-roles.md b/docs/auth-roles.md index b60f9aa..256d6dc 100644 --- a/docs/auth-roles.md +++ b/docs/auth-roles.md @@ -192,10 +192,22 @@ policy appliquée à ces deux endpoints dans le contrôleur actuel. ### Implementation Blazor ```csharp -// Layout — masquer le menu Admin si pas Admin -@if (await AuthorizeService.HasPermissionAsync(AppPermissions.AdminManage)) +// MainLayout — le groupe Administration apparaît avec l’une de ces permissions. +@if (Auth.HasPermission("Admin.Users") || Auth.HasPermission("Admin.Manage")) { - ⚙️ Administration + Administration + + @if (Auth.HasPermission("Admin.Users")) + { + Utilisateurs + Groupes + Rôles + } + + @if (Auth.HasPermission("Admin.Manage")) + { + Claims + } } // Page Events — filtrer par site si User non-Admin diff --git a/skills/ui-unknown-route/SKILL.md b/skills/ui-unknown-route/SKILL.md index d786648..6286347 100644 --- a/skills/ui-unknown-route/SKILL.md +++ b/skills/ui-unknown-route/SKILL.md @@ -9,7 +9,7 @@ Heimdall renders its root `Routes` component in an interactive server circuit wi The reusable interactive error screen is `Components/Pages/NotFound.razor`. It owns its `MainLayout`, title/body localization, and the return link to `/dashboard`. Keep it assigned as `Router.NotFoundPage` for client-side unknown navigation. Keep the static HTTP fallback's resource keys and link target aligned with this component. -When maintaining the route inventory in `docs/ui-pages.md`, verify each current route against the Razor `@page` directives. Mark removed mockups as historical and link to the replacement pages; do not preserve a retired route such as `/admin` as if it were still mapped. +When maintaining route documentation, verify each current route against the Razor `@page` directives. Also check route examples in navigation and authorization guides against the current layout links and their visibility conditions. Mark removed mockups as historical and link to the replacement pages; do not preserve a retired route such as `/admin` as if it were still mapped. ## Acceptance workflow