mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 00:48:32 +01:00
allow to create reverse alias for NOREPLY
This commit is contained in:
parent
6afe86b395
commit
9ba5464bc9
1 changed files with 5 additions and 3 deletions
|
@ -36,6 +36,7 @@ from app.config import (
|
||||||
MAX_NB_SUBDOMAIN,
|
MAX_NB_SUBDOMAIN,
|
||||||
MAX_NB_DIRECTORY,
|
MAX_NB_DIRECTORY,
|
||||||
ROOT_DIR,
|
ROOT_DIR,
|
||||||
|
NOREPLY,
|
||||||
)
|
)
|
||||||
from app.db import Session
|
from app.db import Session
|
||||||
from app.errors import (
|
from app.errors import (
|
||||||
|
@ -1648,6 +1649,7 @@ class Contact(Base, ModelMixin):
|
||||||
website_email = sanitize_email(website_email)
|
website_email = sanitize_email(website_email)
|
||||||
|
|
||||||
# make sure contact.website_email isn't a reverse alias
|
# make sure contact.website_email isn't a reverse alias
|
||||||
|
if website_email != NOREPLY:
|
||||||
orig_contact = Contact.get_by(reply_email=website_email)
|
orig_contact = Contact.get_by(reply_email=website_email)
|
||||||
if orig_contact:
|
if orig_contact:
|
||||||
raise CannotCreateContactForReverseAlias(str(orig_contact))
|
raise CannotCreateContactForReverseAlias(str(orig_contact))
|
||||||
|
|
Loading…
Reference in a new issue