mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-19 08:03:16 +00:00
`authed.folders` is a snapshot cached alongside the caller's token, so a grant made after it was cached denies a script the caller can legitimately read: the folder created by the deploy they are being redirected from, or one an admin has just added them to. Enforcing RLS on the by-hash reads without accounting for that would reintroduce the staleness the privileged-pool shortcut was papering over. Resolve the path first and refresh group and folder membership from the database before running the read under RLS. The existence probe the miss path already did now comes from that same lookup, so the denial path is a query cheaper. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>