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.

TableRoleMain content
saved_filterSaved filtersuser, screen route, name, the query (filter_*, sort, order, limit) and the field snapshot

Process

  1. savedfilter.list&page_route=…: the user's saved filters for the screen, the save and delete rights and the selector captions. page_route only accepts the extension's own route form.
  2. savedfilter.save (mode = new or overwrite): 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.
  3. 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 basic modify permission on the route.
  • Delete: canAction(delete) and basic modify permission.
  • Content scope: the filter neither narrows nor widens access; the list's own content scope applies. The keys are not classified in any seed.
Related topics: saved filter permissions