TenantAtlas/tests/Feature/Rbac
ahmido 1f3619bd16 feat: tenant-owned query canon and wrong-tenant guards (#180)
## Summary
- introduce a shared tenant-owned query and record-resolution canon for first-slice Filament resources
- harden direct views, row actions, bulk actions, relation managers, and workspace-admin canonical viewers against wrong-tenant access
- add registry-backed rollout metadata, search posture handling, architectural guards, and focused Pest coverage for scope parity and 404/403 semantics

## Included
- Spec 150 package under `specs/150-tenant-owned-query-canon-and-wrong-tenant-guards/`
- shared support classes: `TenantOwnedModelFamilies`, `TenantOwnedQueryScope`, `TenantOwnedRecordResolver`
- shared Filament concern: `InteractsWithTenantOwnedRecords`
- resource/page/policy hardening across findings, policies, policy versions, backup schedules, backup sets, restore runs, inventory items, and Entra groups
- additional regression coverage for canonical tenant state, wrong-tenant record resolution, relation-manager congruence, and action-surface guardrails

## Validation
- `vendor/bin/sail artisan test --compact` passed
- full suite result: `2733 passed, 8 skipped`
- formatting applied with `vendor/bin/sail bin pint --dirty --format agent`

## Notes
- Livewire v4.0+ compliant via existing Filament v5 stack
- provider registration remains in `bootstrap/providers.php`
- globally searchable first-slice posture: Entra groups scoped; policies and policy versions explicitly disabled
- destructive actions continue to use confirmation and policy authorization
- no new Filament assets added; existing deployment flow remains unchanged, including `php artisan filament:assets` when registered assets are used

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #180
2026-03-18 08:33:13 +00:00
..
RoleMatrix 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
ActionSurfaceRbacSemanticsTest.php feat: action-surface contract inspect affordance + clickable rows (#100) 2026-02-08 20:31:36 +00:00
AdminGlobalSearchContextSafetyTest.php feat: tenant-owned query canon and wrong-tenant guards (#180) 2026-03-18 08:33:13 +00:00
AdminTenantOwnedPolicyContextTest.php feat: tenant-owned query canon and wrong-tenant guards (#180) 2026-03-18 08:33:13 +00:00
BackupItemsRelationManagerSemanticsTest.php feat: tenant-owned query canon and wrong-tenant guards (#180) 2026-03-18 08:33:13 +00:00
BackupItemsRelationManagerUiEnforcementTest.php feat: tenant-owned query canon and wrong-tenant guards (#180) 2026-03-18 08:33:13 +00:00
CreateRestoreRunAuthorizationTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
CrossResourceNavigationAuthorizationTest.php feat: add resolved reference presentation layer (#161) 2026-03-10 18:52:52 +00:00
DenialDiagnosticsTest.php 065-tenant-rbac-v1 (#79) 2026-01-28 21:09:47 +00:00
DriftLandingUiEnforcementTest.php Spec 119: Drift cutover to Baseline Compare (golden master) (#144) 2026-03-06 14:30:49 +00:00
EditProviderConnectionUiEnforcementTest.php feat(spec-089): provider connections tenantless UI (#107) 2026-02-12 16:35:13 +00:00
EditTenantArchiveUiEnforcementTest.php feat: implement tenant action taxonomy lifecycle visibility (#174) 2026-03-16 00:57:17 +00:00
FilamentManageEnforcementTest.php 065-tenant-rbac-v1 (#79) 2026-01-28 21:09:47 +00:00
InventoryItemResourceAuthorizationTest.php feat: tenant-owned query canon and wrong-tenant guards (#180) 2026-03-18 08:33:13 +00:00
OnboardingWizardUiEnforcementTest.php feat: implement tenant action taxonomy lifecycle visibility (#174) 2026-03-16 00:57:17 +00:00
PolicyVersionMaintenanceAuthorizationTest.php 065-tenant-rbac-v1 (#79) 2026-01-28 21:09:47 +00:00
PolicyVersionsRestoreToIntuneUiEnforcementTest.php feat: tenant-owned query canon and wrong-tenant guards (#180) 2026-03-18 08:33:13 +00:00
ProviderConnectionsCreateUiEnforcementTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
RegisterTenantAuthorizationTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
ResolvedReferenceAuthorizationTest.php feat: add resolved reference presentation layer (#161) 2026-03-10 18:52:52 +00:00
TenantActionSurfaceConsistencyTest.php feat: central tenant operability policy (#177) 2026-03-17 11:48:55 +00:00
TenantAdminAuthorizationTest.php fix: consolidate tenant creation + harden selection flows (#131) 2026-02-22 19:54:24 +00:00
TenantLifecycleActionNamingTest.php feat: implement tenant action taxonomy lifecycle visibility (#174) 2026-03-16 00:57:17 +00:00
TenantLifecycleActionVisibilityTest.php feat: central tenant operability policy (#177) 2026-03-17 11:48:55 +00:00
TenantMembershipsRelationManagerUiEnforcementTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
TenantResourceAuthorizationTest.php feat: central tenant operability policy (#177) 2026-03-17 11:48:55 +00:00
UiEnforcementDestructiveTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
UiEnforcementMemberDisabledTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
UiEnforcementNonMemberHiddenTest.php feat: implement tenant action taxonomy lifecycle visibility (#174) 2026-03-16 00:57:17 +00:00
WorkspaceMembershipsRelationManagerUiEnforcementTest.php feat: workspace-first managed tenants + RBAC membership UI fixes (072) (#87) 2026-02-02 23:54:22 +00:00