TenantAtlas/app/Services
ahmido 9d0c884251 fix: prevent null workspace_id in tenant_permissions (#116)
Adds workspace_id to the TenantPermission::updateOrCreate(...) payload and gates persistence when $tenant->workspace_id is null: TenantPermissionService.php
Updates/extends tests so this is covered:
Persists with workspace even if events are disabled
Does not persist at all when tenant workspace is missing
TenantPermissionServiceTest.php

## Summary
<!-- Kurz: Was ändert sich und warum? -->

## Spec-Driven Development (SDD)
- [ ] Es gibt eine Spec unter `specs/<NNN>-<feature>/`
- [ ] Enthaltene Dateien: `plan.md`, `tasks.md`, `spec.md`
- [ ] Spec beschreibt Verhalten/Acceptance Criteria (nicht nur Implementation)
- [ ] Wenn sich Anforderungen während der Umsetzung geändert haben: Spec/Plan/Tasks wurden aktualisiert

## Implementation
- [ ] Implementierung entspricht der Spec
- [ ] Edge cases / Fehlerfälle berücksichtigt
- [ ] Keine unbeabsichtigten Änderungen außerhalb des Scopes

## Tests
- [ ] Tests ergänzt/aktualisiert (Pest/PHPUnit)
- [ ] Relevante Tests lokal ausgeführt (`./vendor/bin/sail artisan test` oder `php artisan test`)

## Migration / Config / Ops (falls relevant)
- [ ] Migration(en) enthalten und getestet
- [ ] Rollback bedacht (rückwärts kompatibel, sichere Migration)
- [ ] Neue Env Vars dokumentiert (`.env.example` / Doku)
- [ ] Queue/cron/storage Auswirkungen geprüft

## UI (Filament/Livewire) (falls relevant)
- [ ] UI-Flows geprüft
- [ ] Screenshots/Notizen hinzugefügt

## Notes
<!-- Links, Screenshots, Follow-ups, offene Punkte -->

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #116
2026-02-15 21:56:37 +00:00
..
Audit feat: unified managed tenant onboarding wizard (#88) 2026-02-03 17:30:15 +00:00
Auth Spec 094: Assignment ops observability hardening (#113) 2026-02-15 14:08:14 +00:00
BackupScheduling Spec 092: Legacy Purge (runs/routes/UI/test shims) (#110) 2026-02-14 18:43:56 +00:00
Directory feat(spec-087): remove legacy runs (#106) 2026-02-12 12:40:51 +00:00
Drift feat(spec-087): remove legacy runs (#106) 2026-02-12 12:40:51 +00:00
Graph Spec 095: Graph contracts registry completeness + registry-backed call sites (#114) 2026-02-15 15:02:27 +00:00
Intune fix: prevent null workspace_id in tenant_permissions (#116) 2026-02-15 21:56:37 +00:00
Inventory feat(spec-087): remove legacy runs (#106) 2026-02-12 12:40:51 +00:00
Operations 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
Providers feat(spec-087): remove legacy runs (#106) 2026-02-12 12:40:51 +00:00
Verification feat(verification): unify verification surfaces (Spec 084) (#102) 2026-02-09 11:28:09 +00:00
AdapterRunReconciler.php 056-remove-legacy-bulkops (#65) 2026-01-19 23:27:52 +00:00
AssignmentBackupService.php Spec 094: Assignment ops observability hardening (#113) 2026-02-15 14:08:14 +00:00
AssignmentRestoreService.php Spec 094: Assignment ops observability hardening (#113) 2026-02-15 14:08:14 +00:00
OperationRunService.php Spec 096: Ops polish (assignment summaries + dedupe + reconcile tracking + seed DX) (#115) 2026-02-15 20:49:38 +00:00