care.security.authorization.template module

class TemplateAccess

Bases: AuthorizationHandler

can_list_facility_template(user, facility)

Check if the user has permission to view templates in the facility

can_write_facility_template(user, facility)

Check if the user has permission to write templates in the facility

can_preview_template(user)

Authorize user to preview templates - allows superuser, admin and facility admin

can_view_template_schema(user)

Authorize user to view template schema - allows superuser, admin and facility admin

can_generate_report_from_template(user, facility)

Check if the user has permission to generate reports from templates