mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 16:03:47 +00:00
The role save took an advisory lock of its own while principal cleanup took the settings row, so the two never excluded each other: a save could persist a permissions block it had computed before a group's deletion took that group off it. The settings form had the same shape with no lock at all — it carries the old permissions forward by construction. They all take the settings row now, before reading and until they have written, which is the lock the cleanups already used. One mechanism, so there is no ordering to get wrong, and the advisory lock goes away with its cached query. The tenant removal says what it does not do: it authorizes nothing, and the rules differ per caller — a workspace admin for a user, the owner for a group or folder, no identity for the system paths — so the name carries `_unchecked` the way the resolution helpers next to it do.