models.PrivacyLog
- New property is_expired: if anyof the LegalReason are expired return True.
models.LegalReasonGroup
- New field "is_nenewable": flag the log as renewable (duh), default to False.
models.LegalReason
- New field "duration": as we can't have user consents for data processing for an indefinite period this will store how log we can use the data for this purpose, default to 365 days.
- New field "changed_at": this is a Django auto_now field, when a LegalReason change then we must expire the corresponding log.
- New method check_expiration: return True if the consents is expired or the LegalReason is changed
middleware.ConsentExpiredMiddleware
A middleware that check PrivacyLog for a user instance (so the consents given during registration) and add some context to response if True. This is mostly as an example of how to handle consents expiration, but it can be used.