mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 13:25:11 +00: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:
@@ -59,10 +59,7 @@ class UserAuthenticationBackend(AuthenticationBackend):
|
|||||||
email="default@example.com",
|
email="default@example.com",
|
||||||
password="default",
|
password="default",
|
||||||
)
|
)
|
||||||
Subscription.objects.create(
|
Subscription.objects.create(user=default_user, type="standard", renewal_date="2100-04-01")
|
||||||
user=default_user,
|
|
||||||
type="trial",
|
|
||||||
)
|
|
||||||
|
|
||||||
async def authenticate(self, request: HTTPConnection):
|
async def authenticate(self, request: HTTPConnection):
|
||||||
current_user = request.session.get("user")
|
current_user = request.session.get("user")
|
||||||
|
|||||||
@@ -76,5 +76,6 @@ class SubscriptionFactory(factory.django.DjangoModelFactory):
|
|||||||
model = Subscription
|
model = Subscription
|
||||||
|
|
||||||
user = factory.SubFactory(UserFactory)
|
user = factory.SubFactory(UserFactory)
|
||||||
type = "trial"
|
type = "standard"
|
||||||
is_recurring = False
|
is_recurring = False
|
||||||
|
renewal_date = "2100-04-01"
|
||||||
|
|||||||
Reference in New Issue
Block a user