Remove the guest system entirely: no is_guest/device_id, no guest throttles, phone login is the only way in

accounts.0008 drops the columns and refuses to run while guest rows exist.
Docs describe the current state; tests that only proved guest behaviour are gone.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-05 18:20:10 +03:30
parent 8835e01595
commit 663252a260
61 changed files with 357 additions and 1518 deletions

View File

@@ -46,8 +46,8 @@ class EstimateMinutesTests(SimpleTestCase):
class WeeklyReportApiTests(TestCase):
def setUp(self):
cache.clear()
self.user = User.objects.create(phone='09120009001', is_guest=False)
self.other = User.objects.create(phone='09120009002', is_guest=False)
self.user = User.objects.create(phone='09120009001')
self.other = User.objects.create(phone='09120009002')
grade = Grade.objects.create(title='پایه نهم', icon='', color='')
node = Node.objects.create(unit=Unit.objects.create(grade=grade, title='فصل', order=1),
title='جزیره', order=1)
@@ -139,12 +139,12 @@ class NodeProgressIsOwnOnlyTests(TestCase):
def setUp(self):
cache.clear()
self.user = User.objects.create(phone='09120009003', is_guest=False)
self.user = User.objects.create(phone='09120009003')
self.client = APIClient()
self.client.credentials(HTTP_AUTHORIZATION=f'Bearer {issue_access_token(self.user.id)}')
def test_someone_elses_id_returns_only_your_own_progress(self):
other = User.objects.create(phone='09120009004', is_guest=False)
other = User.objects.create(phone='09120009004')
node = Node.objects.create(
unit=Unit.objects.create(grade=Grade.objects.create(title='پایه', icon='', color=''),
title='فصل', order=1),