feat: Implement role-based dashboards, user management CRUD, and integration request authorization policies.

This commit is contained in:
jeremy bayse
2026-02-21 21:30:52 +01:00
parent abca346b3e
commit 41caefece3
5 changed files with 14 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ class IntegrationService
]);
// Notify RH users about the new request
$rhUsers = \App\Models\User::role('RH')->get();
$rhUsers = \App\Models\User::permission(['validate rh', 'create integration'])->get();
\Illuminate\Support\Facades\Notification::send($rhUsers, new \App\Notifications\NewIntegrationRequestNotification($request));
return $request;
@@ -110,7 +110,7 @@ class IntegrationService
$request->agent->update(['integration_status' => IntegrationStatus::Completed]);
// Notify RH (Standard notification)
$rhUsers = \App\Models\User::role('RH')->get();
$rhUsers = \App\Models\User::permission('validate rh')->get();
\Illuminate\Support\Facades\Notification::send($rhUsers, new \App\Notifications\ProcessCompletedNotification($request));
// Generate PDF for Prescriber and DSI

View File

@@ -56,7 +56,7 @@ class ServiceTaskManager
]);
// Notify RH that a service has completed their task
$rhUsers = \App\Models\User::role('RH')->get();
$rhUsers = \App\Models\User::permission('validate rh')->get();
\Illuminate\Support\Facades\Notification::send($rhUsers, new \App\Notifications\ServiceTaskValidatedNotification($task));
// Trigger check on the parent integration request