ListRowLevelViewSetMixin
Overview
Filter out rows the user cannot access and expose column aggregates.
apply_row_level_filter
Apply row-level and workflow-aware queryset filters for the given perm_type. Calls RowLevelPermissions.check_queryset and, when the model has a workflow, also annotates state permission info and calls check_queryset_workflow.
Signature
apply_row_level_filter(self, queryset, perm_type)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| queryset | yes | ||
| perm_type | yes |
Source
server/vueda/core/viewsets/__init__.py:188
get_column_info
Return aggregated totals for any fields listed in column_totals.
Signature
get_column_info(self, queryset)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| queryset | yes |
Source
server/vueda/core/viewsets/__init__.py:196
list
applying row level filter in get_queryset() causes problems with other drf actions, specifically encountered with create not finding it's created object
Signature
list(self, request, args, kwargs)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| self | yes | ||
| request | yes | ||
| args | yes | ||
| kwargs | yes |
Source
server/vueda/core/viewsets/__init__.py:203
applies_workflow_state_list_filter
column_totals
Source
server/vueda/core/viewsets/__init__.py:182