Skip to content

Roles & Permissions

EaseLab uses role-based access control (RBAC) at the tenant level. Roles bundle permissions; users inherit the union of all assigned roles. Permissions follow a {module}.{action} pattern where action is view, create, edit, or delete.

Screen: /admin/roles
Required permission: roles.view

Permission model

mermaid
flowchart LR
    G[Permission Group] --> M[Module]
    M --> V[view]
    M --> C[create]
    M --> E[edit]
    M --> D[delete]
    G --> Q[Quick Access shortcuts]

Legacy manage codes

Older roles may use shorthand codes such as users.manage. The system expands these to full create/edit/delete rights for that module. New roles should use granular CRUD toggles in the UI matrix.

Invoice deletion

invoices.delete is also satisfied by the legacy code invoices.delete (standalone) in addition to invoices.delete from the CRUD matrix. Treat delete access as highly restricted.

Built-in roles

RoleColorDescription
AdminBlueAll permissions
Lab TechnicianCyanBench workflow: samples, results, catalog read
ReceptionistGreenFront desk: patients, invoices, collection
ViewerGrayRead-only across core modules

Customize or duplicate these roles for your organization.


Admin group

Staff, catalog, and lab configuration

ModuleLabelViewCreateEditDelete
usersUsers
rolesRoles & Permissions
sms_logSMS Log
sample_handlingSample Handling
reports_viewerReports Viewer
profilesTesting Profile
departmentsDepartment View
catalogCatalog
catalog_parametersCatalog Parameters
contactsContacts
backupsBackups
settingsLab Settings
crmCRM

Billing group

Invoices, referrals, and pricing

ModuleLabelViewCreateEditDelete
referralsReferral Doctor
rate_listsCoupons / Special Discount
home_collectionHome Collection Charges
invoicesInvoices
balance_adjustmentBalance Adjustment
deleted_invoicesDeleted Invoices

Patients group

Patient workflow and results

ModuleLabelViewCreateEditDelete
patientsPatients
register_patientsRegister Patients
medicine_prescriptionMedicine Prescription
sample_collectionSample Collection
samplesSamples
results_entryResults Entry
result_verificationResult Verification
report_deliveryReport Delivery
qr_attendanceQR Attendance

Sales group

Stock and operating expenses

ModuleLabelViewCreateEditDelete
stockStock
consumptionConsumption
expensesLab Expenses

Finance group

Ledgers and cash operations

ModuleLabelViewCreateEditDelete
ledgersLedgers
ledger_entriesLedger Entries
daybook_summaryDaybook Summary
patient_vouchersPatient Vouchers
cash_managementCash Management
advance_paymentAdvance Payment
banks_chequeBanks & Cheque Book
transfer_cashTransfer Cash
employee_ledgerEmployee Ledger
employee_advancesEmployee Advances
vendor_paymentVendor Payment
salary_managementSalary Management

Report group

Operational and financial reports

ModuleLabelViewCreateEditDelete
patient_activityPatient Activity
referral_summaryReferral Dr. Summary
unsettled_referralUnsettled Referral Balance
patient_duePatient Due / Unclaimed
delayed_samplesDelayed Samples
pending_samplesPending Samples
top_testsTop Tests
analyticsAnalytics

Subscription group

ModuleLabelViewCreateEditDelete
subscriptionSubscription

Quick Access group

Shortcuts for high-frequency actions in the invoice and messaging workflow. These are standalone permission codes, not CRUD modules.

CodeLabelDescription
quick.create_invoiceCreate InvoiceOpen invoice creation from main workflow
quick.verify_resultsVerify ResultsSign off verified results
quick.mark_all_paidMark All PaidMark invoice payments complete
quick.download_invoiceDownload InvoiceExport invoice PDF
quick.cancel_invoiceCancel InvoiceCancel active invoices
quick.send_smsSend SMSPatient SMS notifications
quick.send_whatsappSend WhatsAppWhatsApp notifications
quick.send_emailSend EmailEmail notifications
quick.print_invoicePrint InvoicePrint invoices and receipts
quick.barcode_printerBarcode PrinterPrint sample barcodes
quick.smart_cardSmart Card ManagerPatient smart card operations

Reception desk bundle

A typical receptionist role combines Patients group view/create/edit, Billing invoices CRUD, and Quick Access items for print, SMS, and barcode printing.

Creating a custom role

  1. Go to Admin → Roles & Permissions.
  2. Click Add Role.
  3. Set name, description, and color (used in UI badges).
  4. Toggle CRUD cells in the matrix — groups collapse for clarity.
  5. Enable Quick Access shortcuts as needed.
  6. Save and assign to users on the Users screen.
mermaid
flowchart TD
    A[Define role] --> B[Set CRUD matrix]
    B --> C[Add Quick Access]
    C --> D[Assign to users]
    D --> E[Test with non-admin account]

Permission evaluation

When a user attempts an action:

  1. Collect all permissions from assigned roles.
  2. Expand legacy .manage codes.
  3. Check PermissionCatalog.Satisfies(held, required).
  4. Deny with HTTP 403 if insufficient.

Tenant Admin flag bypasses permission checks for break-glass accounts — use sparingly.

Ease Lab — Cloud Pathology Lab Management