From 3ce06361c86eb84bdeed1f0bc66fbda8162d71af Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 13 Jun 2024 13:25:08 +0000 Subject: [PATCH] models: Document UserProfile.avatar_hash as LDAP-only. --- zerver/models/users.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zerver/models/users.py b/zerver/models/users.py index f9105ab1cf..d9a3fc5379 100644 --- a/zerver/models/users.py +++ b/zerver/models/users.py @@ -560,6 +560,9 @@ class UserProfile(AbstractBaseUser, PermissionsMixin, UserBaseSettings): default=AVATAR_FROM_GRAVATAR, choices=AVATAR_SOURCES, max_length=1 ) avatar_version = models.PositiveSmallIntegerField(default=1) + # This is only used for LDAP-provided avatars; it contains the + # SHA256 hex digest of most recent raw contents that LDAP provided + # us, pre-thumbnailing. avatar_hash = models.CharField(null=True, max_length=64) # TODO: TUTORIAL_STATUS was originally an optimization designed to