Restrict care unit and department setup to admins.
Deploy Ladill Care / deploy (push) Successful in 48s

Nurses keep Nursing Services for clinical work but can no longer browse or create structural units and departments.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-20 11:33:38 +00:00
co-authored by Cursor
parent 7c32b34715
commit 82a2b1a9a7
7 changed files with 54 additions and 9 deletions
@@ -20,9 +20,11 @@ class CareUnitController extends Controller
public function index(Request $request): View
{
$this->authorizeCareUnitView($request);
$this->authorizeAbility($request, 'admin.departments.view');
$organization = $this->organization($request);
$owner = $this->ownerRef($request);
$member = $this->member($request);
$permissions = app(CarePermissions::class);
$units = CareUnit::owned($owner)
->where('organization_id', $organization->id)
@@ -43,6 +45,7 @@ class CareUnitController extends Controller
'organization' => $organization,
'kinds' => config('care.care_unit_kinds'),
'heroStats' => $heroStats,
'canManage' => $permissions->can($member, 'admin.departments.manage'),
]);
}