From e98141f4c3d91ac774c96fb0966b6414a465a5e7 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Tue, 14 Nov 2023 16:20:55 -0800 Subject: [PATCH] Subscribe default user to standard plan with a far away renewal date Self hosted users in anonymous mode have all capabilities unlocked --- src/khoj/configure.py | 5 +---- tests/helpers.py | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/khoj/configure.py b/src/khoj/configure.py index cfb9fac4..9fb1f019 100644 --- a/src/khoj/configure.py +++ b/src/khoj/configure.py @@ -59,10 +59,7 @@ class UserAuthenticationBackend(AuthenticationBackend): email="default@example.com", password="default", ) - Subscription.objects.create( - user=default_user, - type="trial", - ) + Subscription.objects.create(user=default_user, type="standard", renewal_date="2100-04-01") async def authenticate(self, request: HTTPConnection): current_user = request.session.get("user") diff --git a/tests/helpers.py b/tests/helpers.py index 0f0f9cf2..03f3f9c7 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -76,5 +76,6 @@ class SubscriptionFactory(factory.django.DjangoModelFactory): model = Subscription user = factory.SubFactory(UserFactory) - type = "trial" + type = "standard" is_recurring = False + renewal_date = "2100-04-01"