mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 23:11:12 -05:00
Fix: Prevent bypass of blocking validation errors
This commit is contained in:
@@ -118,9 +118,10 @@ export function SubmissionReviewManager({
|
||||
} else {
|
||||
next.add(itemId);
|
||||
}
|
||||
// Clear blocking errors when selection changes
|
||||
// Clear blocking errors and warning confirmation when selection changes
|
||||
setHasBlockingErrors(false);
|
||||
setValidationResults(new Map());
|
||||
setUserConfirmedWarnings(false);
|
||||
return next;
|
||||
});
|
||||
};
|
||||
@@ -179,7 +180,8 @@ export function SubmissionReviewManager({
|
||||
return result && result.blockingErrors.length > 0;
|
||||
});
|
||||
|
||||
if (itemsWithBlockingErrors.length > 0 && !userConfirmedWarnings) {
|
||||
// CRITICAL: Blocking errors can NEVER be bypassed, regardless of warnings
|
||||
if (itemsWithBlockingErrors.length > 0) {
|
||||
setHasBlockingErrors(true);
|
||||
setShowValidationBlockerDialog(true);
|
||||
setLoading(false);
|
||||
@@ -228,6 +230,9 @@ export function SubmissionReviewManager({
|
||||
variant: failCount > 0 ? 'destructive' : 'default',
|
||||
});
|
||||
|
||||
// Reset warning confirmation state after approval
|
||||
setUserConfirmedWarnings(false);
|
||||
|
||||
onComplete();
|
||||
onOpenChange(false);
|
||||
} catch (error: any) {
|
||||
|
||||
Reference in New Issue
Block a user