mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
allow zero configured addresses for an account
preventing writing out a domains.conf that is invalid and can't be parsed again. this happens when the last address was removed from an account. just a click in the admin web interface. accounts without email address cannot log in. for issue #133 by ally9335
This commit is contained in:
@ -341,7 +341,8 @@ const index = async () => {
|
||||
|
||||
dom.h2('Addresses'),
|
||||
dom.ul(
|
||||
Object.entries(destinations).sort().map(t =>
|
||||
Object.entries(destinations || {}).length === 0 ? dom.li('(None, login disabled)') : [],
|
||||
Object.entries(destinations || {}).sort().map(t =>
|
||||
dom.li(
|
||||
dom.a(t[0], attr.href('#destinations/'+t[0])),
|
||||
t[0].startsWith('@') ? ' (catchall)' : [],
|
||||
@ -689,7 +690,7 @@ const destination = async (name: string) => {
|
||||
let fullName: HTMLInputElement
|
||||
let saveButton: HTMLButtonElement
|
||||
|
||||
const addresses = [name, ...Object.keys(destinations).filter(a => !a.startsWith('@') && a !== name)]
|
||||
const addresses = [name, ...Object.keys(destinations || {}).filter(a => !a.startsWith('@') && a !== name)]
|
||||
|
||||
dom._kids(page,
|
||||
crumbs(
|
||||
|
Reference in New Issue
Block a user