spine-framework 0.3.72 → 0.3.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -209,6 +209,14 @@ export function RegisterPage() {
|
|
|
209
209
|
const handleSubmit = async (e: React.FormEvent) => {
|
|
210
210
|
e.preventDefault()
|
|
211
211
|
setError('')
|
|
212
|
+
|
|
213
|
+
// Guard: if registration config hasn't loaded yet, block submission
|
|
214
|
+
// This prevents silently falling through to new_account when config is needed
|
|
215
|
+
if (!isFirstUser && !inviteToken && !regConfig) {
|
|
216
|
+
setError('Registration configuration not loaded. Please refresh and try again.')
|
|
217
|
+
return
|
|
218
|
+
}
|
|
219
|
+
|
|
212
220
|
setIsLoading(true)
|
|
213
221
|
|
|
214
222
|
try {
|
|
@@ -314,6 +322,9 @@ export function RegisterPage() {
|
|
|
314
322
|
target_account: targetAccount,
|
|
315
323
|
role_slug: effectiveRole,
|
|
316
324
|
}, 'POST')
|
|
325
|
+
} else if (effectiveAccountStrategy === 'existing' && !targetAccount) {
|
|
326
|
+
// Misconfigured: existing strategy but no target account in spine.config.json
|
|
327
|
+
throw new Error('Registration misconfigured: account_strategy is "existing" but no target_account is set.')
|
|
317
328
|
} else {
|
|
318
329
|
// Create new account (personal or company)
|
|
319
330
|
console.log('Using new_account path')
|