feat : able to use mutil email
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user