Skip to main content

Command Palette

Search for a command to run...

A saved view can keep listing rows the user can no longer open

Updated
•1 min read•View as Markdown
A
Practical lessons on auth, authorization, and access control.

Saved views often store a filter (status = open, owner = me) or a snapshot of matching IDs. The list endpoint re-runs that filter for the current user, but some implementations only re-apply the saved WHERE clause and skip the per-row read check that the normal list uses.

Someone loses access to three deals that still match "status = open". The saved view still returns those three, because the view query never asks whether the viewer can read each row.

When you resolve a saved view, apply the same read filter you use on the default list, for the current viewer. Filter after (or with) the saved criteria. If you cache view results, key the cache by viewer permissions, or recheck on read.

Quick test: save a view that matches ten records, revoke access to five, reload the view. If the revoked rows still appear, the view skipped the check.

More from this blog

A

Auth By Example

79 posts