From 23f1c690a4a5cfda84d4ef74af4c76ab2c49efd3 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 12 Aug 2025 16:43:43 +0200 Subject: [PATCH] Add descriptive texts for community auth version when configuring --- pgweb/account/migrations/0010_communityauthsite_version.py | 2 +- pgweb/account/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pgweb/account/migrations/0010_communityauthsite_version.py b/pgweb/account/migrations/0010_communityauthsite_version.py index 00574d23..9e849a55 100644 --- a/pgweb/account/migrations/0010_communityauthsite_version.py +++ b/pgweb/account/migrations/0010_communityauthsite_version.py @@ -13,6 +13,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='communityauthsite', name='version', - field=models.IntegerField(choices=[(2, 2), (3, 3), (4, 4)], default=2), + field=models.IntegerField(choices=[(2, "v2 - DEPRECATED"), (3, "v3 - recommended"), (4, "v4 - ChaCha20_Poly1305 compatibility")], default=2), ), ] diff --git a/pgweb/account/models.py b/pgweb/account/models.py index 6ee715b2..fdc08c26 100644 --- a/pgweb/account/models.py +++ b/pgweb/account/models.py @@ -18,7 +18,7 @@ class CommunityAuthSite(models.Model): apiurl = models.URLField(max_length=200, null=False, blank=True) cryptkey = models.CharField(max_length=100, null=False, blank=False, help_text="Use tools/communityauth/generate_cryptkey.py to create a key") - version = models.IntegerField(choices=((2, 2), (3, 3), (4, 4)), default=2) + version = models.IntegerField(choices=((2, "v2 - DEPRECATED"), (3, "v3 - recommended"), (4, "v4 - ChaCha20_Poly1305 compatibility")), default=2) comment = models.TextField(null=False, blank=True) org = models.ForeignKey(CommunityAuthOrg, null=False, blank=False, on_delete=models.CASCADE) cooloff_hours = models.PositiveIntegerField(null=False, blank=False, default=0, -- 2.39.5