TenantAtlas/apps/platform/app/Policies
ahmido fcb03d2aee feat: harden provider connection authority resolution (339) (#410)
## Summary
- harden Provider Connection authority so workspace scope comes only from explicit workspace context and record ownership
- require explicit `environment_id` for Provider Connection create flows and remove remembered-environment or Filament-tenant fallback authority
- keep legacy query aliases such as `tenant`, `tenant_id`, and `managed_environment_id` inert for Provider Connection access
- add targeted Spec 339 feature coverage for create authority, workspace authority, and wrong-workspace / legacy-query denial behavior
- include Spec 339 artifacts (`spec.md`, `plan.md`, `tasks.md`) for the hardening slice

## Validation
- `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/ProviderConnections --filter=ScopeHardening`

## Notes
- no new uncommitted workspace changes were present to commit in this turn; the branch already contained the feature commits
- Livewire v4 compliance unchanged
- Filament provider registration remains in `bootstrap/providers.php`
- no migrations, new assets, or route-family restructures

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #410
2026-05-31 11:59:41 +00:00
..
AlertDeliveryPolicy.php Spec 182: relocate Laravel platform to apps/platform (#213) 2026-04-08 08:40:47 +00:00
AlertDestinationPolicy.php Spec 182: relocate Laravel platform to apps/platform (#213) 2026-04-08 08:40:47 +00:00
AlertRulePolicy.php Spec 182: relocate Laravel platform to apps/platform (#213) 2026-04-08 08:40:47 +00:00
BackupSchedulePolicy.php feat: cut over tenant core to managed environments (#335) 2026-05-07 06:38:14 +00:00
EntraGroupPolicy.php feat: cut over tenant core to managed environments (#335) 2026-05-07 06:38:14 +00:00
EnvironmentReviewPolicy.php refactor: consolidate internal tenant model naming (#355) 2026-05-14 11:13:28 +00:00
EvidenceSnapshotPolicy.php feat: implement spec 285 workspace-first environment access (#344) 2026-05-09 12:40:50 +00:00
FindingExceptionPolicy.php feat: clean up legacy tenant environment context (#372) 2026-05-16 18:25:36 +00:00
FindingPolicy.php feat: cut over tenant core to managed environments (#335) 2026-05-07 06:38:14 +00:00
ManagedEnvironmentOnboardingSessionPolicy.php feat: clean up legacy tenant environment context (#372) 2026-05-16 18:25:36 +00:00
OperationRunPolicy.php feat: implement spec 285 workspace-first environment access (#344) 2026-05-09 12:40:50 +00:00
ProviderConnectionPolicy.php feat: harden provider connection authority resolution (339) (#410) 2026-05-31 11:59:41 +00:00
ReviewPackPolicy.php feat: implement spec 285 workspace-first environment access (#344) 2026-05-09 12:40:50 +00:00
WorkspaceMembershipPolicy.php Spec 182: relocate Laravel platform to apps/platform (#213) 2026-04-08 08:40:47 +00:00
WorkspacePolicy.php Spec 182: relocate Laravel platform to apps/platform (#213) 2026-04-08 08:40:47 +00:00
WorkspaceSettingPolicy.php Spec 182: relocate Laravel platform to apps/platform (#213) 2026-04-08 08:40:47 +00:00