feat : able to use mutil email
CI / Verify (push) Successful in 54s
CI / Build immutable images and deploy (push) Has been skipped

This commit is contained in:
2026-08-29 08:18:21 +00:00 Unverified
parent 659a57fb4a
commit 6a932baa98
6 changed files with 29 additions and 6 deletions
+8 -2
View File
@@ -8,9 +8,15 @@ export interface SessionUserLike {
export function isConfiguredAdminEmail(
email: string | null | undefined,
adminEmail: string | null | undefined,
adminEmailConfig: string | null | undefined,
): boolean {
return Boolean(email && adminEmail && email === adminEmail);
if (!email || !adminEmailConfig) return false;
return adminEmailConfig
.split(",")
.map((configuredEmail) => configuredEmail.trim())
.filter(Boolean)
.includes(email);
}
export function isAllowedAdminRegistration(