Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

123 too long titles leads to error #124

Merged
merged 6 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions b3lb/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# b3lb v3.1 - Delay update to Django 4.x because of dependencies
Django==3.2.19
PyGObject==3.44.1
aiohttp==3.8.4
boto3==1.26.163
Django==3.2.23
PyGObject==3.46.0
aiohttp==3.8.6
boto3==1.28.77
django-extensions==3.2.3
celery==5.3.1
celery==5.3.4
celery-singleton==0.3.1
django-cacheops==7.0.1
django-cacheops==7.0.2
django-db-file-storage==0.5.5
django-celery-admin==0.1
django-celery-beat==2.5.0
django-celery-results==2.5.1
django-environ==0.10.0
django-redis==5.3.0
django-storages==1.13.2
django-environ==0.11.2
django-redis==5.4.0
django-storages==1.14.2
intervaltree==3.1.0
psycopg2cffi==2.9.0
requests==2.31.0
uvicorn[standard]==0.22.0
uvicorn[standard]==0.23.2
xmltodict==0.13.0
File renamed without changes.
292 changes: 292 additions & 0 deletions b3lb/rest/b3lb/parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
#############
# CONSTANTS #
#############

# MODES
BLOCK = "BLOCK"
SET = "SET"
OVERRIDE = "OVERRIDE"

MODE_CHOICES = [
(BLOCK, BLOCK),
(SET, SET),
(OVERRIDE, OVERRIDE)
]

# Regexes
BOOLEAN_REGEX = r'^(true|false)$'
NUMBER_REGEX = r'^\d+$'
POLICY_REGEX = r'^(ALWAYS_ACCEPT|ALWAYS_DENY|ASK_MODERATOR)$'
COLOR_REGEX = r'^#[a-fA-F0-9]{6}$'
LOCALE_REGEX = r'^[a-z]{2}$'
CAMERA_REGEX = r'^(low-u30|low-u25|low-u20|low-u15|low-u12|low-u8|low|medium|high|hd)$'
URL_REGEX = r"^https?://[\w.-]+(?:\.[\w.-]+)+[\w._~:/?#[\]@!\$&'()*+,;=.%-]+$"
ROLE_REGEX = r'^(VIEWER|MODERATOR)$'
MEETING_LAYOUT_REGEX = r'(CUSTOM_LAYOUT|SMART_LAYOUT|PRESENTATION_FOCUS|VIDEO_FOCUS)$'
AUDIO_BRIDGE_REGEX = r'^(sipjs|kurento|fullaudio)$'
ANY_REGEX = r'.'

# Create Parameters
ALLOW_MODS_TO_UNMUTE_USERS = "allowModsToUnmuteUsers"
ALLOW_START_STOP_RECORDING = "allowStartStopRecording"
AUTO_START_RECORDING = "autoStartRecording"
BANNER_COLOR = "bannerColor"
BANNER_TEXT = "bannerText"
COPYRIGHT = "copyright"
DISABLED_FEATURES = "disabledFeatures"
DISABLED_FEATURES_EXCLUDED = "disabledFeaturesExclude"
DURATION = "duration"
END_WHEN_NO_MODERATOR = "endWhenNoModerator"
END_WHEN_NO_MODERATOR_DELAY_IN_MINUTES = "endWhenNoModeratorDelayInMinutes"
GROUPS = "groups"
GUEST_POLICY = "guestPolicy"
LEARNING_DASHBOARD_CLEANUP_DELAY_IN_MINUTES = "learningDashboardCleanupDelayInMinutes"
LOCK_SETTINGS_DISABLE_CAM = "lockSettingsDisableCam"
LOCK_SETTINGS_DISABLE_MIC = "lockSettingsDisableMic"
LOCK_SETTINGS_DISABLE_PRIVATE_CHAT = "lockSettingsDisablePrivateChat"
LOCK_SETTINGS_DISABLE_PUBLIC_CHAT = "lockSettingsDisablePublicChat"
LOCK_SETTINGS_DISABLE_NOTE = "lockSettingsDisableNote"
LOCK_SETTINGS_HIDE_VIEWER_CURSOR = "lockSettingsHideViewersCursor"
LOCK_SETTINGS_LOCKED_LAYOUT = "lockSettingsLockedLayout"
LOCK_SETTINGS_LOCK_ON_JOIN = "lockSettingsLockOnJoin"
LOCK_SETTINGS_LOCK_ON_JOIN_CONFIGURABLE = "lockSettingsLockOnJoinConfigurable"
LOGO = "logo"
LOGOUT_URL = "logoutURL"
MAX_PARTICIPANTS = "maxParticipants"
MEETING_CAMERA_CAP = "meetingCameraCap"
MEETING_EXPIRE_IF_NO_USER_JOINED_IN_MINUTES = "meetingExpireIfNoUserJoinedInMinutes"
MEETING_EXPIRE_WHEN_LAST_USER_LEFT_IN_MINUTES = "meetingExpireWhenLastUserLeftInMinutes"
MEETING_KEEP_EVENT = "meetingKeepEvents"
MEETING_LAYOUT = "meetingLayout"
META_FULLAUDIO_BRIDGE = "meta_fullaudio-bridge"
MODERATOR_ONLY_MESSAGE = "moderatorOnlyMessage"
MUTE_ON_START = "muteOnStart"
NOTIFY_RECORDING_IS_ON = "notifyRecordingIsOn"
PRE_UPLOADED_PRESENTATION = "preUploadedPresentation"
PRE_UPLOADED_PRESENTATION_NAME = "preUploadedPresentationName"
PRE_UPLOADED_PRESENTATION_OVERRIDE_DEFAULT = "preUploadedPresentationOverrideDefault"
PRESENTATION_UPLOAD_EXTERNAL_URL = "presentationUploadExternalUrl"
PRESENTATION_UPLOAD_EXTERNAL_DESCRIPTION = "presentationUploadExternalDescription"
RECORD = "record"
RECORD_FULL_DURATION_MEDIA = "recordFullDurationMedia"
WEBCAMS_ONLY_FOR_MODERATOR = "webcamsOnlyForModerator"
WELCOME = "welcome"

# Join Parameters
# see https://docs.bigbluebutton.org/admin/customize.html#passing-custom-parameters-to-the-client-on-join for documentation
#
# some join parameters needs settings.yml defined inputs, see
# https://github.com/bigbluebutton/bigbluebutton/blob/develop/bigbluebutton-html5/private/config/settings.yml
# for possible options
ERROR_REDIRECT_URL = "errorRedirectUrl"
EXCLUDE_FROM_DASHBOARD = "excludeFromDashboard"
ROLE = "role"
USERDATA_BBB_ASK_FOR_FEEDBACK_ON_LOGOUT = "userdata-bbb_ask_for_feedback_on_logout"
USERDATA_BBB_AUTO_JOIN_AUDIO = "userdata-bbb_auto_join_audio"
USERDATA_BBB_AUTO_SHARE_WEBCAM = "userdata-bbb_auto_share_webcam"
USERDATA_BBB_AUTO_SWAP_LAYOUT = "userdata-bbb_auto_swap_layout"
USERDATA_BBB_CLIENT_TITLE = "userdata-bbb_client_title"
USERDATA_BBB_CUSTOM_STYLE = "userdata-bbb_custom_style"
USERDATA_BBB_CUSTOM_STYLE_URL = "userdata-bbb_custom_style_url"
USERDATA_BBB_DISPLAY_BRANDING_AREA = "userdata-bbb_display_branding_area"
USERDATA_BBB_ENABLE_SCREEN_SHARING = "userdata-bbb_enable_screen_sharing"
USERDATA_BBB_ENABLE_VIDEO = "userdata-bbb_enable_video"
USERDATA_BBB_FORCE_RESTORE_PRESENTATION_ON_NEW_EVENTS = "userdata-bbb_force_restore_presentation_on_new_events"
USERDATA_BBB_FORCE_LISTEN_ONLY = "userdata-bbb_force_listen_only"
USERDATA_BBB_FULL_AUDIO_BRIDGE = "userdata-bbb_fullaudio_bridge"
USERDATA_BBB_HIDE_PRESENTATION = "userdata-bbb_hide_presentation"
USERDATA_BBB_HIDE_PRESENTATION_ON_JOIN = "userdata-bbb_hide_presentation_on_join"
USERDATA_BBB_LISTEN_ONLY_MODE = "userdata-bbb_listen_only_mode"
USERDATA_BBB_MIRROR_OWN_WEBCAM = "userdata-bbb_mirror_own_webcam"
USERDATA_BBB_MULTI_USER_PEN_ONLY = "userdata-bbb_multi_user_pen_only"
USERDATA_BBB_MULTI_USER_TOOLS = "userdata-bbb_multi_user_tools"
USERDATA_BBB_OVERRIDE_DEFAULT_LOCALE = "userdata-bbb_override_default_locale"
USERDATA_BBB_PREFERRED_CAMERA_PROFILE = "userdata-bbb_preferred_camera_profile"
USERDATA_BBB_PRESENTER_TOOLS = "userdata-bbb_presenter_tools"
USERDATA_BBB_RECORD_VIDEO = "userdata-bbb_record_video"
USERDATA_BBB_SHORTCUTS = "userdata-bbb_shortcuts"
USERDATA_BBB_SHOW_PARTICIPANTS_ON_LOGIN = "userdata-bbb_show_participants_on_login"
USERDATA_BBB_SHOW_PUBLIC_CHAT_ON_LOGIN = "userdata-bbb_show_public_chat_on_login"
USERDATA_BBB_SKIP_CHECK_AUDIO = "userdata-bbb_skip_check_audio"
USERDATA_BBB_SKIP_CHECK_AUDIO_ON_FIRST_JOIN = "userdata-bbb_skip_check_audio_on_first_join"
USERDATA_BBB_SKIP_VIDEO_PREVIEW = "userdata-bbb_skip_video_preview"
USERDATA_BBB_SKIP_VIDEO_PREVIEW_ON_FIRST_JOIN = "userdata-bbb_skip_video_preview_on_first_join"
USERDATA_BBB_OUTSIDE_TOGGLE_RECORDING = "userdata-bbb_outside_toggle_recording"
USERDATA_BBB_OUTSIDE_TOGGLE_SELF_VOICE = "userdata-bbb_outside_toggle_self_voice"

PARAMETERS_CREATE = [
ALLOW_MODS_TO_UNMUTE_USERS,
ALLOW_START_STOP_RECORDING,
AUTO_START_RECORDING,
BANNER_COLOR,
BANNER_TEXT,
COPYRIGHT,
DISABLED_FEATURES,
DISABLED_FEATURES_EXCLUDED,
DURATION,
END_WHEN_NO_MODERATOR,
END_WHEN_NO_MODERATOR_DELAY_IN_MINUTES,
GROUPS,
GUEST_POLICY,
LEARNING_DASHBOARD_CLEANUP_DELAY_IN_MINUTES,
LOCK_SETTINGS_DISABLE_CAM,
LOCK_SETTINGS_DISABLE_MIC,
LOCK_SETTINGS_DISABLE_PRIVATE_CHAT,
LOCK_SETTINGS_DISABLE_PUBLIC_CHAT,
LOCK_SETTINGS_DISABLE_NOTE,
LOCK_SETTINGS_HIDE_VIEWER_CURSOR,
LOCK_SETTINGS_LOCKED_LAYOUT,
LOCK_SETTINGS_LOCK_ON_JOIN,
LOCK_SETTINGS_LOCK_ON_JOIN_CONFIGURABLE,
LOGO,
LOGOUT_URL,
MAX_PARTICIPANTS,
MEETING_CAMERA_CAP,
MEETING_EXPIRE_IF_NO_USER_JOINED_IN_MINUTES,
MEETING_EXPIRE_WHEN_LAST_USER_LEFT_IN_MINUTES,
MEETING_KEEP_EVENT,
MEETING_LAYOUT,
META_FULLAUDIO_BRIDGE,
MODERATOR_ONLY_MESSAGE,
MUTE_ON_START,
NOTIFY_RECORDING_IS_ON,
PRE_UPLOADED_PRESENTATION,
PRE_UPLOADED_PRESENTATION_NAME,
PRE_UPLOADED_PRESENTATION_OVERRIDE_DEFAULT,
PRESENTATION_UPLOAD_EXTERNAL_URL,
PRESENTATION_UPLOAD_EXTERNAL_DESCRIPTION,
RECORD,
RECORD_FULL_DURATION_MEDIA,
WEBCAMS_ONLY_FOR_MODERATOR,
WELCOME,
]

PARAMETERS_JOIN = [
ERROR_REDIRECT_URL,
EXCLUDE_FROM_DASHBOARD,
ROLE,
USERDATA_BBB_ASK_FOR_FEEDBACK_ON_LOGOUT,
USERDATA_BBB_AUTO_JOIN_AUDIO,
USERDATA_BBB_AUTO_SHARE_WEBCAM,
USERDATA_BBB_AUTO_SWAP_LAYOUT,
USERDATA_BBB_CLIENT_TITLE,
USERDATA_BBB_CUSTOM_STYLE,
USERDATA_BBB_CUSTOM_STYLE_URL,
USERDATA_BBB_DISPLAY_BRANDING_AREA,
USERDATA_BBB_ENABLE_SCREEN_SHARING,
USERDATA_BBB_ENABLE_VIDEO,
USERDATA_BBB_FORCE_RESTORE_PRESENTATION_ON_NEW_EVENTS,
USERDATA_BBB_FORCE_LISTEN_ONLY,
USERDATA_BBB_FULL_AUDIO_BRIDGE,
USERDATA_BBB_HIDE_PRESENTATION,
USERDATA_BBB_HIDE_PRESENTATION_ON_JOIN,
USERDATA_BBB_LISTEN_ONLY_MODE,
USERDATA_BBB_MIRROR_OWN_WEBCAM,
USERDATA_BBB_MULTI_USER_PEN_ONLY,
USERDATA_BBB_MULTI_USER_TOOLS,
USERDATA_BBB_OVERRIDE_DEFAULT_LOCALE,
USERDATA_BBB_PREFERRED_CAMERA_PROFILE,
USERDATA_BBB_PRESENTER_TOOLS,
USERDATA_BBB_RECORD_VIDEO,
USERDATA_BBB_SHORTCUTS,
USERDATA_BBB_SHOW_PARTICIPANTS_ON_LOGIN,
USERDATA_BBB_SHOW_PUBLIC_CHAT_ON_LOGIN,
USERDATA_BBB_SKIP_CHECK_AUDIO,
USERDATA_BBB_SKIP_CHECK_AUDIO_ON_FIRST_JOIN,
USERDATA_BBB_SKIP_VIDEO_PREVIEW,
USERDATA_BBB_SKIP_VIDEO_PREVIEW_ON_FIRST_JOIN,
USERDATA_BBB_OUTSIDE_TOGGLE_RECORDING,
USERDATA_BBB_OUTSIDE_TOGGLE_SELF_VOICE,
]

PARAMETER_REGEXES = {
# Create
ALLOW_MODS_TO_UNMUTE_USERS: BOOLEAN_REGEX,
ALLOW_START_STOP_RECORDING: BOOLEAN_REGEX,
AUTO_START_RECORDING: BOOLEAN_REGEX,
BANNER_COLOR: COLOR_REGEX,
BANNER_TEXT: ANY_REGEX,
COPYRIGHT: ANY_REGEX,
DISABLED_FEATURES: ANY_REGEX,
DISABLED_FEATURES_EXCLUDED: ANY_REGEX,
DURATION: NUMBER_REGEX,
END_WHEN_NO_MODERATOR: BOOLEAN_REGEX,
END_WHEN_NO_MODERATOR_DELAY_IN_MINUTES: NUMBER_REGEX,
GROUPS: ANY_REGEX,
GUEST_POLICY: POLICY_REGEX,
LEARNING_DASHBOARD_CLEANUP_DELAY_IN_MINUTES: NUMBER_REGEX,
LOCK_SETTINGS_DISABLE_CAM: BOOLEAN_REGEX,
LOCK_SETTINGS_DISABLE_MIC: BOOLEAN_REGEX,
LOCK_SETTINGS_DISABLE_PRIVATE_CHAT: BOOLEAN_REGEX,
LOCK_SETTINGS_DISABLE_PUBLIC_CHAT: BOOLEAN_REGEX,
LOCK_SETTINGS_DISABLE_NOTE: BOOLEAN_REGEX,
LOCK_SETTINGS_HIDE_VIEWER_CURSOR: BOOLEAN_REGEX,
LOCK_SETTINGS_LOCKED_LAYOUT: BOOLEAN_REGEX,
LOCK_SETTINGS_LOCK_ON_JOIN: BOOLEAN_REGEX,
LOCK_SETTINGS_LOCK_ON_JOIN_CONFIGURABLE: BOOLEAN_REGEX,
LOGO: URL_REGEX,
LOGOUT_URL: URL_REGEX,
MAX_PARTICIPANTS: NUMBER_REGEX,
MEETING_CAMERA_CAP: NUMBER_REGEX,
MEETING_EXPIRE_IF_NO_USER_JOINED_IN_MINUTES: NUMBER_REGEX,
MEETING_EXPIRE_WHEN_LAST_USER_LEFT_IN_MINUTES: NUMBER_REGEX,
MEETING_KEEP_EVENT: BOOLEAN_REGEX,
MEETING_LAYOUT: MEETING_LAYOUT_REGEX,
META_FULLAUDIO_BRIDGE: AUDIO_BRIDGE_REGEX,
MODERATOR_ONLY_MESSAGE: ANY_REGEX,
MUTE_ON_START: BOOLEAN_REGEX,
NOTIFY_RECORDING_IS_ON: BOOLEAN_REGEX,
PRE_UPLOADED_PRESENTATION: URL_REGEX,
PRE_UPLOADED_PRESENTATION_NAME: ANY_REGEX,
PRE_UPLOADED_PRESENTATION_OVERRIDE_DEFAULT: BOOLEAN_REGEX,
PRESENTATION_UPLOAD_EXTERNAL_DESCRIPTION: ANY_REGEX,
PRESENTATION_UPLOAD_EXTERNAL_URL: URL_REGEX,
RECORD: BOOLEAN_REGEX,
RECORD_FULL_DURATION_MEDIA: BOOLEAN_REGEX,
WEBCAMS_ONLY_FOR_MODERATOR: BOOLEAN_REGEX,
WELCOME: ANY_REGEX,

# Join
ERROR_REDIRECT_URL: URL_REGEX,
EXCLUDE_FROM_DASHBOARD: BOOLEAN_REGEX,
ROLE: ROLE_REGEX,
USERDATA_BBB_ASK_FOR_FEEDBACK_ON_LOGOUT: BOOLEAN_REGEX,
USERDATA_BBB_AUTO_JOIN_AUDIO: BOOLEAN_REGEX,
USERDATA_BBB_AUTO_SHARE_WEBCAM: BOOLEAN_REGEX,
USERDATA_BBB_AUTO_SWAP_LAYOUT: BOOLEAN_REGEX,
USERDATA_BBB_CLIENT_TITLE: ANY_REGEX,
USERDATA_BBB_CUSTOM_STYLE: ANY_REGEX,
USERDATA_BBB_CUSTOM_STYLE_URL: URL_REGEX,
USERDATA_BBB_DISPLAY_BRANDING_AREA: BOOLEAN_REGEX,
USERDATA_BBB_ENABLE_SCREEN_SHARING: BOOLEAN_REGEX,
USERDATA_BBB_ENABLE_VIDEO: BOOLEAN_REGEX,
USERDATA_BBB_FORCE_LISTEN_ONLY: BOOLEAN_REGEX,
USERDATA_BBB_FORCE_RESTORE_PRESENTATION_ON_NEW_EVENTS: BOOLEAN_REGEX,
USERDATA_BBB_FULL_AUDIO_BRIDGE: BOOLEAN_REGEX,
USERDATA_BBB_HIDE_PRESENTATION: BOOLEAN_REGEX,
USERDATA_BBB_HIDE_PRESENTATION_ON_JOIN: BOOLEAN_REGEX,
USERDATA_BBB_LISTEN_ONLY_MODE: BOOLEAN_REGEX,
USERDATA_BBB_MIRROR_OWN_WEBCAM: BOOLEAN_REGEX,
USERDATA_BBB_MULTI_USER_PEN_ONLY: BOOLEAN_REGEX,
USERDATA_BBB_MULTI_USER_TOOLS: ANY_REGEX,
USERDATA_BBB_OUTSIDE_TOGGLE_RECORDING: BOOLEAN_REGEX,
USERDATA_BBB_OUTSIDE_TOGGLE_SELF_VOICE: BOOLEAN_REGEX,
USERDATA_BBB_OVERRIDE_DEFAULT_LOCALE: LOCALE_REGEX,
USERDATA_BBB_PREFERRED_CAMERA_PROFILE: CAMERA_REGEX,
USERDATA_BBB_PRESENTER_TOOLS: ANY_REGEX,
USERDATA_BBB_RECORD_VIDEO: BOOLEAN_REGEX,
USERDATA_BBB_SHORTCUTS: ANY_REGEX,
USERDATA_BBB_SHOW_PARTICIPANTS_ON_LOGIN: BOOLEAN_REGEX,
USERDATA_BBB_SHOW_PUBLIC_CHAT_ON_LOGIN: BOOLEAN_REGEX,
USERDATA_BBB_SKIP_CHECK_AUDIO: BOOLEAN_REGEX,
USERDATA_BBB_SKIP_CHECK_AUDIO_ON_FIRST_JOIN: BOOLEAN_REGEX,
USERDATA_BBB_SKIP_VIDEO_PREVIEW: BOOLEAN_REGEX,
USERDATA_BBB_SKIP_VIDEO_PREVIEW_ON_FIRST_JOIN: BOOLEAN_REGEX
}

PARAMETER_CHOICES = []
for parameter in PARAMETERS_CREATE:
PARAMETER_CHOICES.append((parameter, parameter))

for parameter in PARAMETERS_JOIN:
PARAMETER_CHOICES.append((parameter, parameter))
23 changes: 12 additions & 11 deletions b3lb/rest/classes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
from requests import get
from requests.exceptions import RequestException
from rest.b3lb.metrics import incr_metric, update_create_metrics
from rest.b3lb.parameters import ALLOW_START_STOP_RECORDING, AUTO_START_RECORDING, BLOCK, LOGO, OVERRIDE, PARAMETERS_CREATE, PARAMETERS_JOIN, RECORD, SET, USERDATA_BBB_CUSTOM_STYLE_URL
from rest.b3lb.utils import get_checksum
from rest.models import ClusterGroupRelation, Meeting, Metric, Node, Parameter, Record, RecordSet, Secret, SecretMeetingList, SecretMetricsList, Stats
from typing import Any, Dict, List, Literal, Union
from uuid import UUID
from urllib.parse import urlencode
from xmltodict import parse
import rest.b3lb.contants as cst
import rest.b3lb.constants as cst


class ClientB3lbRequest:
Expand Down Expand Up @@ -328,32 +329,32 @@ def check_checksum(self) -> bool:
def check_parameters(self, meeting: Meeting = None, created: bool = False):
parameters = Parameter.objects.filter(tenant=self.secret.tenant)
if self.endpoint == "join":
endpoint_parameters = Parameter.PARAMETERS_JOIN
endpoint_parameters = PARAMETERS_JOIN
elif self.endpoint == "create":
endpoint_parameters = Parameter.PARAMETERS_CREATE
endpoint_parameters = PARAMETERS_CREATE
else:
endpoint_parameters = []

for parameter in parameters:
if parameter.parameter in endpoint_parameters:
if parameter.parameter in self.parameters:
if parameter.mode == Parameter.BLOCK:
if parameter.mode == BLOCK:
self.parameters.pop(parameter.parameter)
elif parameter.mode == Parameter.OVERRIDE:
elif parameter.mode == OVERRIDE:
self.parameters[parameter.parameter] = parameter.value
elif parameter.mode in [Parameter.SET, Parameter.OVERRIDE]:
elif parameter.mode in [SET, OVERRIDE]:
self.parameters[parameter.parameter] = parameter.value

if self.endpoint == "join" and Parameter.USERDATA_BBB_CUSTOM_STYLE_URL not in self.parameters and hasattr(self.secret.tenant, 'asset') and self.secret.tenant.asset.custom_css:
self.parameters[Parameter.USERDATA_BBB_CUSTOM_STYLE_URL] = self.secret.tenant.asset.custom_css_url
if self.endpoint == "join" and USERDATA_BBB_CUSTOM_STYLE_URL not in self.parameters and hasattr(self.secret.tenant, 'asset') and self.secret.tenant.asset.custom_css:
self.parameters[USERDATA_BBB_CUSTOM_STYLE_URL] = self.secret.tenant.asset.custom_css_url

elif self.endpoint == "create":
self.parameters.pop("dialNumber", None)
self.parameters.pop("voiceBridge", None)

# check for custom logo
if Parameter.LOGO not in self.parameters and hasattr(self.secret.tenant, 'asset') and self.secret.tenant.asset.logo:
self.parameters[Parameter.LOGO] = self.secret.tenant.asset.logo_url
if LOGO not in self.parameters and hasattr(self.secret.tenant, 'asset') and self.secret.tenant.asset.logo:
self.parameters[LOGO] = self.secret.tenant.asset.logo_url

# check for custom slide
if self.request.method == "GET" and hasattr(self.secret.tenant, 'asset') and self.secret.tenant.asset.slide:
Expand All @@ -371,7 +372,7 @@ def check_parameters(self, meeting: Meeting = None, created: bool = False):
self.parameters[f"meta_{settings.B3LB_RECORD_META_DATA_TAG}"] = record_set.nonce
else:
# record aren't enabled -> suppress any record related parameter
for param in [Parameter.RECORD, Parameter.ALLOW_START_STOP_RECORDING, Parameter.AUTO_START_RECORDING]:
for param in [RECORD, ALLOW_START_STOP_RECORDING, AUTO_START_RECORDING]:
self.parameters[param] = "false"

self.parameters["meta_endCallbackUrl"] = f"https://{settings.B3LB_API_BASE_DOMAIN}/b3lb/b/meeting/end?nonce={meeting.nonce}"
Expand Down
Loading
Loading