feat: Implement secretary permissions enforcement across multiple resources
- Added SecretaryAccessChecker to manage resource access for secretaries. - Integrated permission checks for payments, inventory, and tags in relevant controllers. - Updated PaymentController and PaymentMethodController to enforce secretary permissions. - Enhanced TenantTagController to check permissions for tag management actions. - Introduced tests for secretary resource enforcement, ensuring proper access control. - Updated DoctorSecretary entity to include inventory and tags permissions. - Created a comprehensive audit document for secretary permissions coverage and enforcement. - Fixed potential crashes in SecretaryDashboard when rendering without doctor data.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
Patient records track patients per entity (doctor or clinic). Each record holds multiple sessions (visits). Access requires an active subscription with the `patient_records` feature.
|
||||
|
||||
> **دسترسی منشی:** برای `ROLE_SECRETARY` روی منبع `patients` اعمال میشود (`SecretaryAccessChecker`). خواندنها از طریق `scope()` کنترل میشوند: منشیِ بدون `patients.view` هیچ پروندهای نمیبیند (scope = unknown → 404/403). نوشتنها guard جداگانه دارند: ایجاد بیمار→`patients.create`؛ ویرایش/زیرمنابع (note/call/message/medical-record/attachment/session)→`patients.update`. عملیاتِ مالیِ بیمار (کیفپول، پرداختِ جلسه) روی منبع `payments` اعمال میشوند. نبودِ مجوز → `403`. جزئیات: [secretary.md](secretary.md).
|
||||
|
||||
**Base path:** `/api/v1`
|
||||
**Auth:** Bearer JWT (doctor, clinic, or secretary)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user