mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 13:06:12 +03:00
This commit adds a `password` field to the `Room` model to support private watch party rooms. It updates the `RoomSerializer` to include the password (write-only) and a boolean indicator (`is_private`). Furthermore, it enforces password verification in both the REST API (`RoomViewSet.retrieve`) and the WebSocket layer (`WatchPartyConsumer.connect`). Corresponding security tests have been added. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
24 lines
556 B
Python
24 lines
556 B
Python
# Generated by Django 5.1.6 on 2026-03-15 11:16
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("watchparty", "0002_room_watchparty__is_acti_09cc59_idx"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name="room",
|
|
name="password",
|
|
field=models.CharField(
|
|
blank=True,
|
|
help_text="Optional password for private rooms",
|
|
max_length=128,
|
|
null=True,
|
|
),
|
|
),
|
|
]
|