fix(camera): make admin role check asynchronous #286

Merged
arnaud.dartois merged 1 commits from fix/7447-camera-access-async into main 2026-11-07 19:21:56 +01:00
Owner

Summary

Make CameraAccessService admin membership checks asynchronous through EF Core, passing cancellation through the role lookup and camera/site queries. Update the filter contract and preserve the existing admin bypass and non-admin grants.

Closes #281

Validation

  • dotnet test tests/Heimdall.Infrastructure.Tests/Heimdall.Infrastructure.Tests.csproj --filter 'FullyQualifiedName~CameraAccessServiceTests|FullyQualifiedName~CameraAccessAdminPostgresTests' — passed, 26 tests including PostgreSQL admin/viewer authorization.
  • dotnet test tests/Heimdall.Web.Tests/Heimdall.Web.Tests.csproj --filter 'FullyQualifiedName~ResourceAccessTests' — passed, 14 tests.
  • python3 scripts/ci/check-efcore-usage.py — passed.
  • Disposable Compose from this source passed: /healthz 200 and unauthenticated /api/events 401. Project heimdall-7447-accept-20261107170319-23018 was torn down; containers, volumes, network and exact local tag heimdall:heimdall-7447-accept-20261107170319-23018-central verified absent.

CI checks are pending; this PR is not merged.

Focused workflow: skills/camera-access-async-admin-check/SKILL.md.

## Summary Make `CameraAccessService` admin membership checks asynchronous through EF Core, passing cancellation through the role lookup and camera/site queries. Update the filter contract and preserve the existing admin bypass and non-admin grants. Closes #281 ## Validation - `dotnet test tests/Heimdall.Infrastructure.Tests/Heimdall.Infrastructure.Tests.csproj --filter 'FullyQualifiedName~CameraAccessServiceTests|FullyQualifiedName~CameraAccessAdminPostgresTests'` — passed, 26 tests including PostgreSQL admin/viewer authorization. - `dotnet test tests/Heimdall.Web.Tests/Heimdall.Web.Tests.csproj --filter 'FullyQualifiedName~ResourceAccessTests'` — passed, 14 tests. - `python3 scripts/ci/check-efcore-usage.py` — passed. - Disposable Compose from this source passed: `/healthz` 200 and unauthenticated `/api/events` 401. Project `heimdall-7447-accept-20261107170319-23018` was torn down; containers, volumes, network and exact local tag `heimdall:heimdall-7447-accept-20261107170319-23018-central` verified absent. CI checks are pending; this PR is not merged. Focused workflow: `skills/camera-access-async-admin-check/SKILL.md`.
arnaud.dartois added 1 commit 2026-11-07 18:13:29 +01:00
fix(camera): await admin role lookup in access checks (#281)
Heimdall Gitea / Detect CI scope (pull_request) Successful in 28s
Heimdall Gitea / Build and tests (pull_request) Successful in 23m51s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m40s
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 10m5s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (pull_request) Successful in 20m47s
Heimdall Gitea / CI policy (pull_request) Successful in 16s
d86171fe7c
arnaud.dartois merged commit 86d77dc462 into main 2026-11-07 19:21:56 +01:00
arnaud.dartois deleted branch fix/7447-camera-access-async 2026-11-07 19:21:56 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arnaud.dartois/Heimdall#286