care.emr.reports.authorizers.utils module

report_authorizer(user, report_type: str, associating_id: str, permission: str)

Authorize user access to a report based on report type and permission.

Parameters:
  • user – User requesting access

  • report_type – Type of report (from ReportTypeRegistry)

  • associating_id – UUID of the associated resource

  • permission – Either “read” or “write”

Raises:

PermissionDenied – If user doesn’t have permission

read_report_authorizer(user, report_type: str, associating_id: str)
write_report_authorizer(user, report_type: str, associating_id: str)