mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 20:42:02 +00:00
49309b43d3
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com> Co-authored-by: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com>
18 lines
614 B
TypeScript
18 lines
614 B
TypeScript
import type { TourCompletionRecord } from "@/lib/tours/tour-types";
|
|
|
|
export interface GateDecisionInput {
|
|
// `undefined` allowed; strict `=== false` check below fails open on ambiguous signals.
|
|
hasProviders: boolean | undefined;
|
|
completionRecord: TourCompletionRecord | null;
|
|
}
|
|
|
|
// Only forces onboarding when providers are provably absent and no record exists.
|
|
export function shouldStartOnboarding({
|
|
hasProviders,
|
|
completionRecord,
|
|
}: GateDecisionInput): boolean {
|
|
const hasNoRecord =
|
|
completionRecord === null || completionRecord === undefined;
|
|
return hasProviders === false && hasNoRecord;
|
|
}
|