@@ -780,6 +780,23 @@ def __table_args__(self):
780
780
return (ForeignKeyConstraint (['receiver_id' ], ['user.id' ], ondelete = 'CASCADE' , deferrable = True , initially = 'DEFERRED' ),
781
781
ForeignKeyConstraint (['internaltip_id' ], ['internaltip.id' ], ondelete = 'CASCADE' , deferrable = True , initially = 'DEFERRED' ))
782
782
783
+ class _Redaction (Model ):
784
+ """
785
+ This models keep track of data redactions applied on internaltips and related objects
786
+ """
787
+ __tablename__ = 'redaction'
788
+
789
+ id = Column (UnicodeText (36 ), primary_key = True , default = uuid4 )
790
+ update_date_date = Column (DateTime , default = datetime_now , nullable = False )
791
+ reference_id = Column (UnicodeText (36 ), nullable = False , index = True )
792
+ internaltip_id = Column (UnicodeText (36 ), nullable = False , index = True )
793
+ temporary_redaction = Column (JSON , default = dict , nullable = False )
794
+ permanent_redaction = Column (JSON , default = dict , nullable = False )
795
+
796
+ @declared_attr
797
+ def __table_args__ (self ):
798
+ return ForeignKeyConstraint (['internaltip_id' ], ['internaltip.id' ], ondelete = 'CASCADE' , deferrable = True , initially = 'DEFERRED' ),
799
+
783
800
784
801
class _Subscriber (Model ):
785
802
__tablename__ = 'subscriber'
@@ -950,6 +967,8 @@ class _User(Model):
950
967
can_postpone_expiration = Column (Boolean , default = True , nullable = False )
951
968
can_grant_access_to_reports = Column (Boolean , default = False , nullable = False )
952
969
can_transfer_access_to_reports = Column (Boolean , default = False , nullable = False )
970
+ can_mask_information = Column (Boolean , default = False , nullable = False )
971
+ can_redact_information = Column (Boolean , default = False , nullable = False )
953
972
can_edit_general_settings = Column (Boolean , default = False , nullable = False )
954
973
readonly = Column (Boolean , default = False , nullable = False )
955
974
two_factor_secret = Column (UnicodeText (32 ), default = '' , nullable = False )
@@ -1124,6 +1143,10 @@ class ReceiverTip(_ReceiverTip, Base):
1124
1143
pass
1125
1144
1126
1145
1146
+ class Redaction (_Redaction , Base ):
1147
+ pass
1148
+
1149
+
1127
1150
class Redirect (_Redirect , Base ):
1128
1151
pass
1129
1152
0 commit comments