completionId: cgen-42eaaf27a9b74607981b4de7c3f42460

cgen-42eaaf27a9b74607981b4de7c3f42460
This commit is contained in:
Builder.io 2025-11-10 23:37:29 +00:00
parent 2a32c4da70
commit df257c72a9

View file

@ -141,9 +141,14 @@ const ensureDailyStreakForProfile = async (
};
};
export function checkProfileComplete(p?: AethexUserProfile | null): boolean {
export function checkProfileComplete(p?: AethexUserProfile | null, roles?: string[]): boolean {
if (!p) return false;
// Admins/owners are always considered complete
if (roles?.some((r) => ["owner", "admin", "founder", "staff"].includes(r.toLowerCase()))) {
return true;
}
if ((p as any).onboarded === true) {
return true;
}