Skip to content

Commit

Permalink
Merge branch 'master' into snyk-fix-7d634f2eb65555f41bf06d6af930e812
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad authored Dec 13, 2023
2 parents b49daf8 + 45dfdfe commit cc0b1d2
Show file tree
Hide file tree
Showing 20 changed files with 156 additions and 71 deletions.
7 changes: 6 additions & 1 deletion app/assets/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"account_info": "Kontoinformation",
"delete_account": "Konto löschen",
"change_password": "Passwort ändern",
"set_password": "Setzen Sie Ihr neues Passwort",
"reset_password": "Passwort zurücksetzen",
"update_account_info": "Konto aktualisieren",
"current_password": "Aktuelles Passwort",
Expand Down Expand Up @@ -129,6 +130,7 @@
"click_to_upload": "Klicken zum Hochladen",
"drag_and_drop": " oder Datei per Drag & Drop hier ablegen.",
"upload_description": "Ein Office-Dokument oder eine PDF-Datei hochladen (nicht größer als {{size}}). Abhängig von der Größe kann das eine gewisse Zeit dauern.",
"delete_presentation": "Präsentation löschen",
"are_you_sure_delete_presentation": "Diese Präsentation wirklich löschen?"
},
"shared_access": {
Expand Down Expand Up @@ -165,6 +167,7 @@
"recording": {
"recording": "Aufzeichnung",
"recordings": "Aufzeichnungen",
"processing": "Aufzeichnungen werden erstellt...",
"name": "Name",
"length": "Länge",
"users": "Nutzer:innen",
Expand Down Expand Up @@ -347,7 +350,8 @@
"manage_site_settings": "Nutzer:innen mit dieser Rolle erlauben, die Webseiteneinstellungen zu verwalten",
"manage_roles": "Nutzer:innen mit dieser Rolle erlauben, andere Rollen zu bearbeiten",
"shared_list": "Nutzer:innen mit dieser Rolle in die Auswahlliste für die gemeinsame Nutzung von Räumen aufnehmen",
"room_limit": "Raumlimit"
"room_limit": "Raumlimit",
"email_on_signup": "Bei Anmeldung neuer Nutzer E-Mail erhalten"
}
}
},
Expand All @@ -358,6 +362,7 @@
"user_updated": "Nutzer:in aktualisiert.",
"user_deleted": "Nutzer:in gelöscht.",
"avatar_updated": "Avatar aktualisiert.",
"password_changed": "Passwort erfolgreich aktualisiert. Bitte erneut anmelden.",
"password_updated": "Passwort aktualisiert.",
"account_activated": "Konto erfolgreich aktiviert. Bitte melden Sie sich in Ihrem Konto an.",
"activation_email_sent": "E-Mail zur Aktivierung wurde gesendet",
Expand Down
9 changes: 7 additions & 2 deletions app/assets/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"account_info": "Informations sur le compte",
"delete_account": "Supprimer le compte",
"change_password": "Changer de mot de passe",
"set_password": "Définissez votre nouveau mot de passe",
"reset_password": "Réinitialiser le mot de passe",
"update_account_info": "Mettre à jour les informations du compte",
"current_password": "Mot de passe actuel",
Expand Down Expand Up @@ -110,7 +111,7 @@
"delete_room": "Supprimer une salle",
"create_new_room": "Créer une nouvelle salle",
"enter_room_name": "Saisissez le nom de la salle",
"shared_by": "Partagé par",
"shared_by": "partagé par",
"last_session": "Dernière session : {{ localizedTime }}",
"no_last_session": "Il n'y a aucune session précédente",
"search_not_found": "Aucune salle trouvée",
Expand All @@ -129,6 +130,7 @@
"click_to_upload": "Cliquez pour téléverser",
"drag_and_drop": "ou glissez-déposez",
"upload_description": "Téléverser tout document Office ou fichier PDF (d'un volume inférieur à {{size}}). Le délai avant de pouvoir utiliser le fichier varie en fonction de son volume.",
"delete_presentation": "Effacer la présentation",
"are_you_sure_delete_presentation": "Etes-vous sûr de vouloir supprimer cet enregistrement ?"
},
"shared_access": {
Expand Down Expand Up @@ -165,6 +167,7 @@
"recording": {
"recording": "Enregistrement",
"recordings": "Enregistrements",
"processing": "Enregistrements en cours de traitement...",
"name": "Nom",
"length": "Durée",
"users": "Utilisateurs",
Expand Down Expand Up @@ -347,7 +350,8 @@
"manage_site_settings": "Permettre aux utilisateurs avec ce rôle de gérer les paramètres du site",
"manage_roles": "Permettre aux utilisateurs avec ce rôle de modifier les autres rôles",
"shared_list": "Inclure les utilisateurs avec ce rôle dans le menu déroulant du partage des salles",
"room_limit": "Limite pour la salle"
"room_limit": "Limite pour la salle",
"email_on_signup": "Recevoir un email quand un nouvel utilisateur s'inscrit"
}
}
},
Expand All @@ -358,6 +362,7 @@
"user_updated": "L'utilisateur a été mis à jour.",
"user_deleted": "L'utilisateur a été supprimé.",
"avatar_updated": "L'avatar a été mis à jour.",
"password_changed": "Votre mot de passe a été mis à jour. Veuillez vous identifier à nouveau.",
"password_updated": "Le mot de passe a été changé.",
"account_activated": "Le compte a été activé avec succès. Veuillez vous connecter à votre compte.",
"activation_email_sent": "Un courriel d'activation a été envoyé.",
Expand Down
15 changes: 13 additions & 2 deletions app/assets/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"are_you_sure": "Вы уверены?",
"return_home": "Вернуться Домой",
"created_at": "Создано",
"view_recordings": "Посмотреть записи",
"join_session": "Присоединиться к вебинару",
"no_result_search_input": "Не удалось найти никаких результатов для \"{{ searchInput }}\"",
"action_permanent": "Это действие не может быть отменено.",
"homepage": {
Expand Down Expand Up @@ -79,6 +81,7 @@
"account_info": "Информация об аккаунте",
"delete_account": "Удалить аккаунт",
"change_password": "Сменить пароль",
"set_password": "Установить новый пароль",
"reset_password": "Сбросить пароль",
"update_account_info": "Обновить информацию об аккаунте",
"current_password": "Текущий пароль",
Expand Down Expand Up @@ -108,7 +111,7 @@
"delete_room": "Удалить комнату",
"create_new_room": "Создать новую комнату",
"enter_room_name": "Введите название комнаты",
"shared_by": "доступ предоставлен ",
"shared_by": "опубликовано",
"last_session": "Последний сеанс: {{ localizedTime }}",
"no_last_session": "Предыдущие сеансы отсутствуют",
"search_not_found": "Комнаты не найдены",
Expand All @@ -127,6 +130,7 @@
"click_to_upload": "Нажмите, чтобы загрузить ",
"drag_and_drop": "или перетащите и отпустите",
"upload_description": "Загрузите любой офисный документ или PDF (размером не более {{size}}). В зависимости от размера файла, для загрузки может потребоваться дополнительное время, прежде чем его можно будет использовать",
"delete_presentation": "Удалить презентацию",
"are_you_sure_delete_presentation": "Вы уверены, что хотите удалить эту презентацию?"
},
"shared_access": {
Expand Down Expand Up @@ -163,6 +167,7 @@
"recording": {
"recording": "Запись",
"recordings": "Записи",
"processing": "Записи обрабатываются...",
"name": "Имя",
"length": "Длина",
"users": "Пользователи",
Expand All @@ -171,11 +176,15 @@
"published": "Опубликована",
"unpublished": "Не опубликована",
"protected": "Защищенные",
"public": "Публичная",
"public_protected": "Публичная/Защищенная",
"length_in_minutes": "{{recording.length}} мин.",
"processing_recording": "Обработка записи, это может занять несколько минут...",
"copy_recording_urls": "Скопировать ссылку на запись",
"recordings_list_empty": "У вас еще нет записей!",
"public_recordings_list_empty": "Публичных записей нет!",
"recordings_list_empty_description": "Записи появятся здесь после того, как вы начнете встречу и запишете ее.",
"public_recordings_list_empty_description": "Записи будут появляться здесь по мере поступления.",
"delete_recording": "Удалить запись",
"are_you_sure_delete_recording": "Вы уверены, что хотите удалить эту запись?",
"search_not_found": "Записи не найдены"
Expand Down Expand Up @@ -341,7 +350,8 @@
"manage_site_settings": "Разрешить пользователям с этой ролью управлять настройками сайта",
"manage_roles": "Разрешить пользователям с этой ролью изменять другие роли",
"shared_list": "Включите пользователей с этой ролью в раскрывающийся список для совместного использования комнат.",
"room_limit": "Ограничение комнаты"
"room_limit": "Ограничение комнаты",
"email_on_signup": "Отправлять email, когда новый пользователь зарегистрируется"
}
}
},
Expand All @@ -352,6 +362,7 @@
"user_updated": "Пользователь обновлен.",
"user_deleted": "Пользователь удален.",
"avatar_updated": "Аватар обновлен.",
"password_changed": "Пароль успешно обновлен. Пожалуйста, войдите в систему еще раз.",
"password_updated": "Пароль обновлен.",
"account_activated": "Учетная запись успешно активирована. Пожалуйста, войдите в ваш аккаунт.",
"activation_email_sent": "Письмо активации было выслано",
Expand Down
6 changes: 6 additions & 0 deletions app/assets/stylesheets/profile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@
display: none;
}
}

#updateUserFormLanguage .dropdown-menu {
max-height: 20vh;
overflow-y: auto;
background-clip: border-box;
}
2 changes: 1 addition & 1 deletion app/controllers/api/v1/admin/site_settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def index
render_data data: site_settings, status: :ok
end

# GET /api/v1/admin/site_settings/:name.json
# PATCH /api/v1/admin/site_settings/:name.json
# Updates the value of the specified Site Setting
def update
site_setting = SiteSetting.joins(:setting)
Expand Down
3 changes: 0 additions & 3 deletions app/controllers/api/v1/recordings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class RecordingsController < ApiController
before_action only: %i[update update_visibility recording_url] do
ensure_authorized(%w[ManageRecordings SharedRoom PublicRecordings], record_id: params[:id])
end
before_action only: %i[index recordings_count] do
ensure_authorized('CreateRoom')
end

# GET /api/v1/recordings.json
# Returns all of the current_user's recordings
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/rooms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RoomsController < ApiController

before_action :find_room, only: %i[show update destroy recordings recordings_processing purge_presentation public_show public_recordings]

before_action only: %i[create index] do
before_action only: %i[create] do
ensure_authorized('CreateRoom')
end
before_action only: %i[create] do
Expand Down
13 changes: 8 additions & 5 deletions app/javascript/components/rooms/EmptyRoomsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import UserBoardIcon from './UserBoardIcon';
export default function EmptyRoomsList() {
const { t } = useTranslation();
const currentUser = useAuth();
const canCreate = currentUser?.permissions.CreateRoom;
const mutationWrapper = (args) => useCreateRoom({ userId: currentUser.id, ...args });

return (
Expand All @@ -39,11 +40,13 @@ export default function EmptyRoomsList() {
<Card.Text>
{ t('room.rooms_list_empty_create_room') }
</Card.Text>
<Modal
modalButton={<Button variant="brand" className="ms-auto me-xxl-1">{ t('room.add_new_room') }</Button>}
title={t('room.create_new_room')}
body={<CreateRoomForm mutation={mutationWrapper} userId={currentUser.id} />}
/>
{ (canCreate === 'true') && (
<Modal
modalButton={<Button variant="brand" className="ms-auto me-xxl-1">{ t('room.add_new_room') }</Button>}
title={t('room.create_new_room')}
body={<CreateRoomForm mutation={mutationWrapper} userId={currentUser.id} />}
/>
)}
</Card.Body>
</Card>
</div>
Expand Down
25 changes: 14 additions & 11 deletions app/javascript/components/rooms/RoomsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default function RoomsList() {
const [searchInput, setSearchInput] = useState('');
const { isLoading, data: rooms } = useRooms(searchInput);
const currentUser = useAuth();
const canCreate = currentUser?.permissions.CreateRoom;
const mutationWrapper = (args) => useCreateRoom({ userId: currentUser.id, ...args });

if (!isLoading && rooms?.length === 0 && !searchInput) {
Expand All @@ -47,17 +48,19 @@ export default function RoomsList() {
<div>
<SearchBar searchInput={searchInput} id="rooms-search" setSearchInput={setSearchInput} />
</div>
<Modal
modalButton={(
<Button
variant="brand"
className="ms-auto me-xxl-1"
>{t('room.add_new_room')}
</Button>
)}
title={t('room.create_new_room')}
body={<CreateRoomForm mutation={mutationWrapper} userId={currentUser.id} />}
/>
{ (canCreate === 'true') && (
<Modal
modalButton={(
<Button
variant="brand"
className="ms-auto me-xxl-1"
>{t('room.add_new_room')}
</Button>
)}
title={t('room.create_new_room')}
body={<CreateRoomForm mutation={mutationWrapper} userId={currentUser.id} />}
/>
)}
</Stack>
<Row className="g-4 mt-4">
{
Expand Down
8 changes: 8 additions & 0 deletions app/javascript/components/rooms/room/join/JoinCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default function JoinCard() {
const location = useLocation();
const queryParams = new URLSearchParams(location.search);
const joinFormName = queryParams.get('joinFormName');
const viewerCode = queryParams.get('viewerCode');

useEffect(() => { // set cookie to return to if needed
const date = new Date();
Expand Down Expand Up @@ -98,6 +99,13 @@ export default function JoinCard() {
}
}, [joinFormName, currentUser?.name]);

useEffect(() => {
// Default viewerCode if passed as query param
if (viewerCode) {
methods.setValue('access_code', viewerCode);
}
}, [viewerCode]);

useEffect(() => {
// Room channel subscription:
if (roomStatusAPI.isSuccess) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ export default function useUpdateSiteSetting(name) {

const uploadPresentation = (data) => {
let settings;
let headers = { 'Content-Type': 'application/json' };

if (name === 'BrandingImage') {
fileValidation(data, 'image');
settings = new FormData();
settings.append('site_setting[value]', data);
headers = { 'Content-Type': 'multipart/form-data' };
} else {
settings = data;
}

return axios.patch(`/admin/site_settings/${name}.json`, settings);
return axios.patch(`/admin/site_settings/${name}.json`, settings, { headers });
};

const handleSuccess = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export default function useUploadPresentation(friendlyId) {
fileValidation(presentation, 'presentation');
const formData = new FormData();
formData.append('room[presentation]', presentation);
return axios.patch(`/rooms/${friendlyId}.json`, formData);
return axios.patch(`/rooms/${friendlyId}.json`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
};

const mutation = useMutation(uploadPresentation, {
Expand Down
6 changes: 5 additions & 1 deletion app/javascript/hooks/mutations/users/useCreateAvatar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export default function useCreateAvatar(currentUser) {
});
const formData = new FormData();
formData.append('user[avatar]', avatarBlob);
return axios.patch(`/users/${currentUser.id}.json`, formData);
return axios.patch(`/users/${currentUser.id}.json`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}

const mutation = useMutation(
Expand Down
12 changes: 6 additions & 6 deletions config/locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@

ar:
opengraph:
description: تعلم باستخدام بك بلو بتن ، الحل الموثوق به لعقد المؤتمرات عبر الويب مفتوح المصدر والذي يتيح التعاون الافتراضي السلس وتجارب التعلم عبر الإنترنت.
description: تعلم باستخدام بك_بلو_بتن ، الحل الموثوق به لعقد المؤتمرات عبر الويب مفتوح المصدر والذي يتيح التعاون الافتراضي السلس وتجارب التعلم عبر الإنترنت.
meeting:
moderator_message: "لدعوة شخص ما إلى الاجتماع ، أرسل لهم هذا الرابط:"
access_code: "رمز الوصول: %{code}"
email:
activation:
account_activation: تفعيل الحساب
welcome_to_bbb: مرحبًا بك في بك بلو بتن!
welcome_to_bbb: مرحبًا بك في بك_بلو_بتن!
get_started: للبدء ، يرجى تفعيل حسابك بالضغط على الزر أدناه.
activate_account: تفعيل حساب
link_expires: ستنتهي صلاحية الرابط في غضون 24 ساعة.
if_link_expires: في حالة انتهاء صلاحية الرابط ، يرجى تسجيل الدخول وطلب بريد إلكتروني جديد للتنشيط.
invitation:
invitation_to_join: دعوة بك بلو بتن
you_have_been_invited: "لقد تمت دعوتك لإنشاء حساب بك بلو بتن بواسطة %{name}."
invitation_to_join: دعوة بك_بلو_بتن
you_have_been_invited: "لقد تمت دعوتك لإنشاء حساب بك_بلو_بتن بواسطة %{name}."
get_started: للتسجيل ، يرجى النقر فوق الزر أدناه واتباع الخطوات.
valid_invitation: الدعوة صالحة لمدة 24 ساعة.
sign_up: التسجيل
new_user_signup:
new_user: تسجيل مستخدم جديد
new_user_description: قام مستخدم جديد بالتسجيل لاستخدام بك بلو بتن.
new_user: تسجيل مستخدم جديد في بك_بلو_بتن
new_user_description: قام مستخدم جديد بالتسجيل لاستخدام بك_بلو_بتن.
name: "الاسم: %{name}"
email: "البريد: %{email}"
admin_panel: "لوحة الإدارة"
Expand Down
7 changes: 7 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ de:
get_started: "Um dich zu registrieren, klicken bitte auf diese Schaltfläche."
valid_invitation: Die Einladung ist 24 Stunden gültig.
sign_up: Registrieren
new_user_signup:
new_user: Anmeldung eines neuen BigBlueButton-Nutzers
new_user_description: Ein neuer Nutzer hat sich angemeldet um BigBlueButton zu benutzen.
name: "Name: %{name}"
email: "E-Mail: %{email}"
admin_panel: "Administrator-Panel"
take_action: "Besuchen Sie das Administrator-Panel um den neuen Nutzer zu sehen und entsprechende Maßnahmen zu ergreifen"
reset:
password_reset: Passwort zurücksetzen
password_reset_requested: "Eine Passwortrücksetzung wurde für %{email} beantragt."
Expand Down
2 changes: 1 addition & 1 deletion config/locales/el.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ el:
valid_invitation: Η πρόσκληση ισχύει για 24 ώρες.
sign_up: Εγγραφή
new_user_signup:
new_user: Εγγραφή νέου χρήστη
new_user: Εγγραφή νέου χρήστη BigBlueButton
new_user_description: Ένας νέος χρήστης έχει εγγραφεί για να χρησιμοποιήσει το BigBlueButton.
name: "Όνομα: %{name}"
email: "Email: %{email}"
Expand Down
Loading

0 comments on commit cc0b1d2

Please sign in to comment.