mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-18 14:33:24 +00:00
♻️(backend) extract forbidden permission fields from the serializer
These fields previously triggered a suspicious operation exception when passed to the API. Make the list configurable so the serializer behavior can be adjusted without requiring a new release.
This commit is contained in:
committed by
aleb_the_flash
parent
bfbf253033
commit
720eb6a93e
@@ -2,6 +2,7 @@
|
||||
|
||||
# pylint: disable=abstract-method,no-name-in-module
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import SuspiciousOperation
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
@@ -318,7 +319,7 @@ class UpdateParticipantSerializer(BaseParticipantsManagementSerializer):
|
||||
|
||||
suspicious_fields = [
|
||||
field
|
||||
for field in ("hidden", "recorder", "agent")
|
||||
for field in settings.PARTICIPANT_FORBIDDEN_PERMISSION_FIELDS
|
||||
if getattr(permission, field) is not None
|
||||
]
|
||||
if suspicious_fields:
|
||||
|
||||
Reference in New Issue
Block a user