From ef2b079d276a2e485383ce0e1a187d882ae5c1dc Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 4 Apr 2023 12:19:52 +0200 Subject: Manage expiration of passwords --- ishtar_common/models.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index c053f7c10..efa061431 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3410,6 +3410,9 @@ class IshtarUser(FullSearch): related_name="ishtaruser", on_delete=models.CASCADE, ) + password_last_update = models.DateField( + _("Password last update"), default=datetime.date.today + ) advanced_shortcut_menu = models.BooleanField( _("Advanced shortcut menu"), default=False ) @@ -3491,6 +3494,8 @@ class IshtarUser(FullSearch): def import_set_password(self, context, value): self.user_ptr.set_password(value) self.user_ptr.save() + self.password_last_update = datetime.date.today() + self.save() @post_importer_action def import_create_profile(self, context, value): -- cgit v1.2.3