@@ -21,9 +21,11 @@ const logger = createLogger('GmailAlias')
2121 * Whether an earlier account, banned or not, already holds the Gmail inbox this
2222 * user's address delivers to. Only an account created before this one counts
2323 * (the id breaks a creation-time tie), so the inbox's first account keeps the
24- * allowance however late its own stats row is created. It must have verified
25- * the address, so an account that merely claimed someone else's inbox never
26- * withholds that person's allowance. Pass the caller's transaction as
24+ * allowance however late its own stats row is created. The earlier account
25+ * counts whether or not it verified the address: the allowance is granted at
26+ * signup, before verification, and where verification is off a password
27+ * account never verifies, so a verified-only rule would let every alias
28+ * registered unverified keep its allowance. Pass the caller's transaction as
2729 * `executor` to read on it; the read then runs in a savepoint, so a failed
2830 * lookup never aborts that transaction. Fails open: a lookup error returns
2931 * `false` and is logged, because refusing a legitimate person's allowance is
@@ -47,7 +49,6 @@ export async function userHasGmailAliasAccount(
4749 . where (
4850 and (
4951 sql `${ gmailMailbox ( user . email ) } = ${ self . mailbox } ` ,
50- eq ( user . emailVerified , true ) ,
5152 or (
5253 lt ( user . createdAt , self . createdAt ) ,
5354 and ( eq ( user . createdAt , self . createdAt ) , lt ( user . id , userId ) )
0 commit comments