Add Alias.disable_email_spoofing_check column
This commit is contained in:
parent
4101142253
commit
9c72f4dec0
|
@ -11,4 +11,5 @@ db.sqlite-journal
|
|||
static/upload
|
||||
adhoc_*
|
||||
adhoc.py
|
||||
venv/
|
||||
venv/
|
||||
.venv
|
|
@ -808,6 +808,13 @@ class Alias(db.Model, ModelMixin):
|
|||
db.Boolean, nullable=False, default=False, server_default="0"
|
||||
)
|
||||
|
||||
# when a mailbox wants to send an email on behalf of the alias via the reverse-alias
|
||||
# several checks are performed to avoid email spoofing
|
||||
# this option allow disabling these checks
|
||||
disable_email_spoofing_check = db.Column(
|
||||
db.Boolean, nullable=False, default=False, server_default="0"
|
||||
)
|
||||
|
||||
user = db.relationship(User)
|
||||
mailbox = db.relationship("Mailbox", lazy="joined")
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: b82bcad9accf
|
||||
Revises: 95938a93ea14
|
||||
Create Date: 2020-08-26 14:38:22.496570
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'b82bcad9accf'
|
||||
down_revision = '95938a93ea14'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('alias', sa.Column('disable_email_spoofing_check', sa.Boolean(), server_default='0', nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('alias', 'disable_email_spoofing_check')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in New Issue