fix: hold the fork page for operators until the rulesets load

On a direct load the rulesets arrive after the first render, so an operator
allowed by AllowOperatorForking briefly saw the Unauthorized alert.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-13 07:00:31 -07:00
co-authored by Claude Opus 5.5
parent 378ac41ce7
commit a2643f36b0
@@ -15,7 +15,9 @@
<!-- The form is reachable by URL whatever the pickers show. Only operators are refused here: the
server refuses their fork unless a ruleset carries `AllowOperatorForking`, and a developer
blocked by `DisableWorkspaceForking` gets the server's ruleset message instead. -->
{#if $userStore?.operator && !canCreateFork($userStore)}
{#if $userStore?.operator && !protectionRulesState.rulesets}
<!-- Until the rulesets arrive, `AllowOperatorForking` reads as off. -->
{:else if $userStore?.operator && !canCreateFork($userStore)}
<div class="p-4 mt-12">
<Alert type="error" title="Unauthorized">Page not available for operators</Alert>
</div>