Files
Heimdall/skills/site-create-permission/SKILL.md
T
arnaud.dartois 5b1255ad80
Heimdall Gitea / Detect CI scope (push) Successful in 27s
Heimdall Gitea / Build and tests (push) Successful in 20m48s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 7m28s
Heimdall Gitea / Build and scan agent image (push) Successful in 11m12s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 1m59s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 19m43s
Heimdall Gitea / CI policy (push) Successful in 2s
Fix camera access and related UI issues (#311)
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-08 21:19:00 +01:00

1.3 KiB

name, description
name description
site-create-permission Keep the Sites page site-creation controls aligned with Heimdall's Site.Write permission.

Site creation permission in the Sites page

AuthState resolves role permissions into Permissions; check creation with Auth.HasPermission("Site.Write") in SitesPage.razor. Render both the create affordance and its overlay/dialog only when that permission exists, and route the button through a guarded open method so an event cannot set the dialog visible after access changes.

The API remains the enforcement boundary. Do not remove or weaken its Site.Write authorization policy as part of this UI behavior.

Acceptance workflow

  1. Add a focused bUnit test using PageTestBase.LoginAs("Viewer"); assert the create button and dialog fields/actions are absent after page load.
  2. Keep an authorized creation test using an authorized role; exercise opening the dialog and completing a successful create response.
  3. Run the focused test with dotnet test tests/Heimdall.Web.Tests --filter FullyQualifiedName~SitesPageTests.
  4. For behavior acceptance, run the disposable Compose recipe from skills/compose-disposable-recipe/SKILL.md, record its isolated project/tag and cleanup evidence on the Gitea issue. UI component tests do not prove API authorization or field deployment behavior.