Forráskód Böngészése

feat(api): reduce User.limit_domains to 1 by default

Peter Thomassen 1 éve
szülő
commit
4c3a98480f

+ 3 - 1
api/api/settings.py

@@ -217,7 +217,9 @@ AUTH_PASSWORD_VALIDATORS = [
 MINIMUM_TTL_DEFAULT = int(os.environ["DESECSTACK_MINIMUM_TTL_DEFAULT"])
 MAXIMUM_TTL = 86400
 AUTH_USER_MODEL = "desecapi.User"
-LIMIT_USER_DOMAIN_COUNT_DEFAULT = 15
+LIMIT_USER_DOMAIN_COUNT_DEFAULT = int(
+    os.environ.get("DESECSTACK_API_LIMIT_USER_DOMAIN_COUNT_DEFAULT", "1")
+)
 USER_ACTIVATION_REQUIRED = True
 VALIDITY_PERIOD_VERIFICATION_SIGNATURE = timedelta(
     hours=int(os.environ.get("DESECSTACK_API_AUTHACTION_VALIDITY", "0"))

+ 2 - 0
api/api/settings_quick_test.py

@@ -36,4 +36,6 @@ REST_FRAMEWORK["DEFAULT_THROTTLE_RATES"] = {"user": "1000/s"}
 # Carry email backend connection over to test mail outbox
 CELERY_EMAIL_MESSAGE_EXTRA_ATTRIBUTES = ["connection"]
 
+LIMIT_USER_DOMAIN_COUNT_DEFAULT = 15
+
 PCH_API = "http://api.invalid"

+ 8 - 0
www/webapp/src/views/HomePage.vue

@@ -487,6 +487,14 @@ export default {
             "have not expired in the meantime are now working when opened. Direct login to the web interface and " +
             "deSEC DNS operations were not affected.",
       },
+      {
+        id: 'news-20231226001',
+        start: new Date(Date.UTC(2023, 12 - 1, 26)),  // first day of showing
+        end: new Date(Date.UTC(2024, 1 - 1, 8)),  // first day of not showing
+        icon: 'mdi-heart-broken',
+        teaser: "Due to a recent spike in abusive domain registrations, new accounts need manual verification before " +
+            "domains can be created. Please contact support explaining your use case to enable domain creation.",
+      },
     ],
   })
 }