move into sonardesk

This commit is contained in:
Mark Gregory
2026-10-12 14:50:13 +01:00
parent 5f0d2ceb72
commit 38b4a7406f
879 changed files with 24021 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
# Phase 5 — Administration authorization correction
This is a **delta package** against Phase 4, not a full project.
## What changed
- Updated the SonarDesk admin Gate to accept an explicitly granted Spatie `manage-sonardesk-licensing` permission (web guard) as well as the existing approved administrator roles.
- Added Pest authorization smoke tests for anonymous users, unprivileged verified users, and the explicit permission grant.
- Did not change any licensing API, checkout, webhook, or customer records.
## Install
1. Back up `Modules/Licensing/Providers/IntegratedLicensingServiceProvider.php`.
2. Copy the included `Modules/Licensing/Providers/IntegratedLicensingServiceProvider.php` over the existing file.
3. Copy the included test into `tests/Feature/` if desired.
4. Run `composer dump-autoload && php artisan optimize:clear && php artisan permission:cache-reset`.
5. Run `php artisan route:list --path=administration/sonardesk -v`.
6. Run `php artisan test --filter=SonarDeskAdminAuthorizationTest` against a **disposable test database**. Do not run destructive test migrations against live customer data.
## Next implementation milestones
- Phase 6: audited commerce checkout, webhook idempotency, customer identity mapping and data import.
- Phase 7: downloads, releases, appcast, system requirements, and ABSDev Stylist frontend.
- Phase 8: complete route parity, automated regression tests, staging deployment and cutover.
## Limitations
- The tests have not been run against your local ABSDev database.
- No production-readiness claim is made; commerce/customer migration is still pending.
+22
View File
@@ -0,0 +1,22 @@
# Phase 6 — ABSDev sidebar and administration theme integration
## Included changes
- Adds a SonarDesk sidebar group to the **existing ABSDev shared admin sidebar**, only when the licensing route exists and the current user is authorised.
- Adds links to SonarDesk overview and licences, with active route highlighting and automatic group expansion.
- Replaces the standalone licensing HTML document with the existing ABSDev `<x-layouts.app>` shell, preserving licensing views and their read-only controllers.
- Does not modify payment processing, customer records, database schema, licence keys or API endpoints.
## Install
Copy the `resources/` and `Modules/` directories over the matching directories in your ABSDev checkout. Back up modified files or commit existing changes first; this patch is based on the uploaded ABSDev source snapshot and may overwrite subsequent local sidebar changes.
Run:
```
php artisan optimize:clear
php artisan view:cache
php artisan route:list --path=administration/sonardesk -v
```
Check the sidebar and each licensing page as an authorised user. Confirm a non-authorised user cannot access the routes. Test mobile layout and dark/light modes.
## Next integration
Paddle checkout, webhook idempotency, subscription mapping, customer migration and downloads require a separate integration and live-environment verification. These are **not** implemented in this patch.
+20
View File
@@ -0,0 +1,20 @@
# Phase 7 — Subscription visibility (read-only)
Adds a SonarDesk **Subscriptions** sidebar link and an authorised `/administration/sonardesk/subscriptions` page showing existing subscription-linked licence records, status, provider, period end, and scheduled cancellation. Uses the same ABSDev administration layout as Phase 6.
**No checkout, Paddle API calls, webhook changes, database migrations, customer merges, or billing mutations.** This phase is intentionally a safe first step toward commerce integration. Figures reflect local records only, not live Paddle data.
## Install
Back up/commit local changes first. Overlay the `Modules/` and `resources/` folders onto ABSDev, preserving paths. The sidebar file is a full replacement based on Phase 6; if you have edited it since then, merge the SonarDesk group manually instead.
```bash
php artisan optimize:clear
php artisan route:list --path=administration/sonardesk -v
```
Check subscriptions page with authorised and unauthorised users. This view requires the licensing database migrations and the Phase 6 layout to be present.
## Still required before billing cutover
Verify Paddle credentials, webhook signatures and idempotency, customer mapping, checkout redirects, and existing production licence continuity in staging. Do not repoint production webhooks yet.