Files
Heimdall/skills/camera-access-async-admin-check/SKILL.md
T
arnaud.dartois 86d77dc462
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Successful in 23m37s
Heimdall Gitea / Publish versioned release (push) Skipped
Heimdall Gitea / Build and scan server image (push) Successful in 8m43s
Heimdall Gitea / Build and scan agent image (push) Successful in 11m51s
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Successful in 18m44s
Heimdall Gitea / Publish Docker Hub latest tags (push) Successful in 2m31s
Heimdall Gitea / CI policy (push) Successful in 4s
fix(camera): make admin role check asynchronous (#286)
Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2026-11-07 19:21:55 +01:00

1.2 KiB

name, description
name description
camera-access-async-admin-check Keep camera and site authorization admin-role checks asynchronous in Heimdall.

Async administrator checks in camera access

CameraAccessService uses IIdentityPersistenceContext for Identity role membership. Never call synchronous EF operators on UserRoles or Roles in this authorization path. The filter API is asynchronous because the admin bypass must be decided before building the grant-filtered camera query.

When changing this behavior:

  • Use AnyAsync and pass the caller's CancellationToken through the role lookup and final camera/site query.
  • Preserve the empty-user rejection and AppRoles.Admin predicate; ordinary users continue to use direct, site-wide, legacy, and live group grants.
  • Keep camera scoping at API/application boundaries. Update ICameraAccessService consumers when changing its async filter contract.
  • Run CameraAccessServiceTests, ResourceAccessTests, and CameraAccessAdminPostgresTests; mocks alone do not establish relational behavior.
  • Run the EF Core persistence policy and disposable source-based Compose acceptance. Record exact image tags and cleanup evidence on the Gitea issue.