mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 09:25:06 +01:00
Subscribe default user to standard plan with a far away renewal date
Self hosted users in anonymous mode have all capabilities unlocked
This commit is contained in:
parent
9d30fda26d
commit
e98141f4c3
2 changed files with 3 additions and 5 deletions
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue