Co-authored-by: Arnaud Dartois <admin@tordais.cc>
2.3 KiB
name, description
| name | description |
|---|---|
| camera-access-groups | Implement and validate Heimdall user-to-camera grants and group camera access through the administration UI and API. |
Camera access and groups
Camera visibility is the union of direct camera grants, site-wide grants, legacy user site assignments, and cameras granted to groups the user belongs to. Keep that union in CameraAccessService and ResourceAccess; do not reimplement partial scope rules in controllers or UI queries. Site and camera resource checks must continue to run at API/application boundaries, including snapshots, events, hubs, and agent assignment.
When editing authorization examples in docs/auth-roles.md, verify routes against the actual controller mappings and explain the query/service-level access filtering. Human JWTs carry role/permission and session claims, not a frozen list of site IDs; do not describe a global SiteScopeMiddleware unless one is implemented.
Manage group-camera membership through the authenticated api/groups/{groupId}/cameras endpoints. The administration page loads all sites and their cameras with bounded paging, displays site names beside cameras, and adds/removes grants through the API. Treat failed loads and mutations as errors; do not optimistically report success.
When changing this area, verify:
ResourceAccessTestsfor the role/grant matrix, live group membership revocation, and union of direct plus group grants.HttpIsolationTestsand the affected API integration tests for real HTTP authorization outcomes.GroupsPageTestsfor site/camera labels and the UI add/remove request sequence.- PostgreSQL integration tests for persistence or query changes; do not use EF InMemory as relational proof.
- The disposable Compose recipe in
skills/compose-disposable-recipe/SKILL.mdfor behavior or deployment changes, using a unique project, network, credentials, ports, and volumes. - If Compose builds Central from source, record a project-unique tag and install an EXIT cleanup trap before build/start. After teardown remove and verify absence of that exact tag even on failure; retain shared base images and report cleanup errors.
Use synthetic camera metadata in automated tests. Physical RTSP, snapshot and reconnect behavior is a separate Agent/camera acceptance and must be reported as unverified unless run against real hardware.