Skip to content

Commit

Permalink
Perform database changes review to support integration of #4330
Browse files Browse the repository at this point in the history
Changes:
- Add 'forwarding' enabler variable to enable/disable forwarding module at site level (default false)
- Renamed 'eo_internaltip_id' to 'forwarding_internaltip_id' considering future possible exention
  of the the functionality to enable to forward reports both to other sites regardless they are
  external or affiliated
  • Loading branch information
evilaliv3 committed Nov 23, 2024
1 parent ec934a8 commit 0bd19ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/globaleaks/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ class _ContentForwarding(Model):
id = Column(UnicodeText(36), primary_key=True, default=uuid4)
internaltip_forwarding_id = Column(UnicodeText(36), nullable=False, index=True)
content_id = Column(UnicodeText(36), nullable=False, index=True)
eo_content_id = Column(UnicodeText(36), nullable=False, index=True)
forwarding_content_id = Column(UnicodeText(36), nullable=False, index=True)
content_origin = Column(Enum(EnumContentForwarding), default='receiver_file', nullable=False)
author_type = Column(Enum(EnumAuthorType), default='main', nullable=False)

Expand Down Expand Up @@ -999,7 +999,7 @@ class _InternalTipForwarding(Model):
__tablename__ = 'internaltip_forwarding'
id = Column(UnicodeText(36), primary_key=True, default=uuid4)
internaltip_id = Column(UnicodeText(36), nullable=False, index=True)
eo_internaltip_id = Column(UnicodeText(36), nullable=False, index=True)
forwarding_internaltip_id = Column(UnicodeText(36), nullable=False, index=True)
tid = Column(Integer, default=1, nullable=False)
creation_date = Column(DateTime, default=datetime_now, nullable=False)
update_date = Column(DateTime, default=datetime_now, nullable=False)
Expand All @@ -1020,7 +1020,7 @@ def __table_args__(self):
initially='DEFERRED'
),
ForeignKeyConstraint(
['eo_internaltip_id'],
['forwarding_internaltip_id'],
['internaltip.id'],
ondelete='CASCADE',
deferrable=True,
Expand Down
1 change: 1 addition & 0 deletions backend/globaleaks/models/config_desc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Bool(Item):
'enable_signup': Bool(default=False),
'encryption': Bool(default=True),
'escrow': Bool(default=False),
'forwarding': Bool(default=False),
'hostname': Unicode(default=''),
'https_admin': Bool(default=True),
'https_accreditor': Bool(default=True),
Expand Down

0 comments on commit 0bd19ef

Please sign in to comment.