mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-16 21:48:48 +00:00
✨(backend) persist user preferences for room defaults on the User model
Add attributes on the User model to persist per-user preferences for the default link access level and the default room configuration. The frontend will let users update these preferences and then reuse them when generating a link through the webapp. Persisting them on the backend (rather than in application memory only) ensures the preferences survive across sessions and devices.
This commit is contained in:
@@ -189,6 +189,25 @@ class User(AbstractBaseUser, BaseModel, auth_models.PermissionsMixin):
|
||||
default=settings.TIME_ZONE,
|
||||
help_text=_("The timezone in which the user wants to see times."),
|
||||
)
|
||||
default_room_access_level = models.CharField(
|
||||
max_length=50,
|
||||
choices=RoomAccessLevel.choices,
|
||||
blank=True,
|
||||
null=True,
|
||||
verbose_name=_("default room access level"),
|
||||
help_text=_(
|
||||
"Access level applied by default to new rooms created by this user. "
|
||||
"When empty, the instance default is used."
|
||||
),
|
||||
)
|
||||
default_room_configuration = models.JSONField(
|
||||
blank=True,
|
||||
default=dict,
|
||||
verbose_name=_("default room configuration"),
|
||||
help_text=_(
|
||||
"Configurations applied by default to new rooms created by this user."
|
||||
),
|
||||
)
|
||||
is_device = models.BooleanField(
|
||||
_("device"),
|
||||
default=False,
|
||||
|
||||
Reference in New Issue
Block a user