## Summary - Adds `plaintext-transactions` Pennant feature flag (defaults to `false` / encryption ON) - When active, new transactions are stored as plaintext (no client-side encryption) - Existing encrypted transactions continue to work — detection is based on `description_iv` being NULL (plaintext) vs present (encrypted) - Migration makes `description_iv` nullable on the transactions table ## Changes **Backend:** - Feature flag definition in `AppServiceProvider`, shared via `HandleInertiaRequests` - `StoreTransactionRequest` / `UpdateTransactionRequest` conditionally require `description_iv` - `TransactionFactory` gains a `plaintext()` state **Frontend:** - Edit dialog and import drawer skip encryption when flag is active - `EncryptedTransactionDescription` renders plaintext directly when IV is null - All decryption loops handle both encrypted and plaintext transactions - Rule re-evaluation stores notes as plaintext when flag is active ## Test plan - [x] Run `php artisan migrate` to apply the migration - [x] Activate flag: `php artisan feature:enable plaintext-transactions all` - [ ] Create a transaction — verify description is stored as plaintext in DB (`description_iv` is NULL) - [ ] Deactivate flag: `php artisan feature:disable plaintext-transactions all` - [ ] Create a transaction — verify encryption is still required (422 without IV) - [x] Verify old encrypted transactions still display correctly - [ ] Run `php artisan test --compact tests/Feature/PlaintextTransactionsTest.php` |
||
|---|---|---|
| .. | ||
| factories | ||
| migrations | ||
| seeders | ||
| .gitignore | ||