diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-04-04 12:19:52 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-04-04 12:19:52 +0200 |
commit | ef2b079d276a2e485383ce0e1a187d882ae5c1dc (patch) | |
tree | 86520f0d7c926f256aab6504900c6256409f9f5f /ishtar_common/models.py | |
parent | 0dac9c341be56b382fb6d5b918997aa2f41995ad (diff) | |
download | Ishtar-ef2b079d276a2e485383ce0e1a187d882ae5c1dc.tar.bz2 Ishtar-ef2b079d276a2e485383ce0e1a187d882ae5c1dc.zip |
Manage expiration of passwords
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
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): |