Saved filters: storage, endpoints and permissions
Data model of the shared saved-filter selector of the lists, the load, save and delete endpoints, the clean-up limits and the permission conditions.
The saved filter is a shared service of every list: it stores the list's URL parameters (filters, sort order, page size) and a snapshot of the filter fields per user and per screen. It grants no access; when loaded, the list's own permission applies.
Data model
Table names carry the installation's own prefix in the database.
| Table | Role | Main content |
|---|---|---|
saved_filter | Saved filters | user, screen route, name, the query (filter_*, sort, order, limit) and the field snapshot |
Process
savedfilter.list&page_route=…: the user's saved filters for the screen, the save and delete rights and the selector captions.page_routeonly accepts the extension's own route form.savedfilter.save(mode=neworoverwrite): the query and the fields are cleaned (at most 80 fields, 500 characters each), saved as new or by overwriting the user's own row, success after reading it back.savedfilter.delete: only the user's own row can be deleted.
The client-side selector is part of the shared script library and is the same on every list.
Rules and errors
- The name is required; when overwriting, the row must exist and belong to the user.
- If the table is missing:
error_table.
Permissions
- Load:
canAction(list). - Save:
canAction(save)and basicmodifypermission on the route. - Delete:
canAction(delete)and basicmodifypermission. - Content scope: the filter neither narrows nor widens access; the list's own content scope applies. The keys are not classified in any seed.