Files
windmill/backend/windmill-api-workspaces
Ruben Fiszel efb62c5e99 enforce CE workspace limit when unarchiving (#9865)
* fix(workspaces): enforce CE workspace limit when unarchiving

Unarchiving a workspace re-activates a soft-deleted (deleted = true)
workspace, effectively bringing it back to the active set. On CE this
bypassed the 2-workspace cap that create_workspace enforces, letting a
user exceed the limit by archiving and re-unarchiving.

Run the same _check_nb_of_workspaces guard before flipping deleted back
to false. The workspace being restored is still deleted = true at that
point, so it is correctly excluded from the count.

Fixes WIN-2119

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(workspaces): cap CE archived workspaces at 1

Complements the unarchive-limit fix: without a cap on archived
workspaces, a CE user could stockpile many soft-deleted workspaces (each
of which still occupies its workspace id and can later be unarchived).

Refuse a new archive on CE when an archived workspace already exists,
mirroring the create/unarchive workspace-count guards.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 17:38:31 +02:00
..
2026-04-07 21:03:06 +00:00