Cover all floor roles in specialty CTA ability gating.
Deploy Ladill Care / deploy (push) Successful in 24s
Deploy Ladill Care / deploy (push) Successful in 24s
8a5330d already keyed Start/stage/vitals on CarePermissions for every
role; add receptionist, lab, pharmacist, and GP-without-module-manage
tests so we never regress to nurse-only branching.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -637,7 +637,8 @@ class SpecialtyModuleController extends Controller
|
||||
$services = $shell->provisionedServices($organization, $module);
|
||||
|
||||
$permissions = app(\App\Services\Care\CarePermissions::class);
|
||||
// Match every ability that mutate routes actually check — module canManage alone is not enough.
|
||||
// Ability-based for every role (doctor, nurse, receptionist, lab, pharmacist, …).
|
||||
// Module canManage alone is not enough — flags must match what mutate routes authorize.
|
||||
$canConsult = $permissions->can($member, 'consultations.manage') && $canManageSpecialty;
|
||||
$canAdvanceStage = $canConsult;
|
||||
$canStartConsultation = $canConsult;
|
||||
|
||||
Reference in New Issue
Block a user