From 0f6ae32a161db75556dd0687d4a72b525ea5e3b3 Mon Sep 17 00:00:00 2001 From: Niraj Raut <84171890+nirajkumar999@users.noreply.github.com> Date: Mon, 29 Jul 2024 19:55:20 +0530 Subject: [PATCH 1/8] Improvement to maintenance banner site setting (#5887) * added .required validation on value field * changed the toast message inside default case of handleError * fixes to maintenanaceBanner TextForm Improvements done : 1. Both settext and clearbanner buttons are of type brand. I changed clearbanner button to variant danger. 2. The inputbox was change from input to textarea. As here the admin would add some message hence it should look like textarea. 3. We have use localstorage to store maintenanceBannerId. Here in our code we fetch that value and pass to toast.dismiss function. As defined in documentation if the value passed to toast.dismiss is null then instead of raising any issue, it dismiss all the toast currently active which is not good for our application. Only required toast should be dismissed if its active else we should not called toast.dismiss. Now localstorage.getItem() returns null if there is no stored value corresponding to key passed to it. Hence this case should be handled. 4. Its good practice that after we extract the value from localstorage and if that value is no longer needed we should remove that key-value pair from localstorage. The same is updated in the code. After dismissing the toast we no longer need the maintenanceBannerId key-value in our localstorage. 5. Both the buttons settext and clearbanner are using spinner to show loading state but both the spinner are depending on same variable `updateSiteSettingsAPI.isLoading`. So both buttons goes in loading state at same time no matter which button is clicked. This is an undesired behavior so I have used two different variable for handling mutations on each button click. This way we can distinguish loading state for both the buttons. const updateSiteSettingsAPISetText = useUpdateSiteSettingsAPI(); const updateSiteSettingsAPIClearText = useUpdateSiteSettingsAPI(); 6. The issue i detected was, when some message is added to input box and settext button is clicked, we see a banner toast coming. But further when that message is updated, and settext is clicked another toast pops up with updated message. The catch is previous toast still persists. It gets removed only when the page is refreshed. So a better way would be to clear the banner toast if it exists and then display the updated banner toast. 7. There is an performance issue on the buttons click for both settext and clearbanner. Even if no text is inputted still we can click both the buttons which leads to unnecessary PATCH request to my api. This behavior i tried to stop by sending PATCH request only if input box is not empty. So i added .required() validation using yup. Now settext wont lead to PATCH request if nothing is inputted. Also on empty input box clearbanner will not send any PATCH request. Further optimization is done to both the buttons to send PATCH request only when there is actual change to message. I prevented api call if settetxt button is clicked unnecessary without any change to message. For this i have introduced a useRef() variable which tracks the value of banner message stored in db. This variable is modified accordingly when PATCH request to send. 8. In useUpdateSiteSetting.jsx hook, the way error is handled is not proper. On error we are calling handleError from FileValidationHelper.jsx which is basically designed to handle error assuming that there is issue with file upload. In default case block we simply tell that there is file upload error. But this might not be apt for all cases. For any invalid setting name, site_setting sets to nil and we return not_found error. But this error is not handled inside useUpdateSiteSetting.jsx. Instead we are sending it to FileValidationHelper.jsx which treats this as upload error. Hence a better and simple way would be to change the default case error message inside FileValidationHelper,jsx to a generic error message. This will cover all the cases. --- app/assets/locales/en.json | 5 ++ .../site_settings/administration/TextForm.jsx | 69 +++++++++++++++---- .../helpers/FileValidationHelper.jsx | 2 +- .../forms/admin/site_settings/useTextForm.js | 2 + 4 files changed, 63 insertions(+), 15 deletions(-) diff --git a/app/assets/locales/en.json b/app/assets/locales/en.json index 1da831d6b8..c701b5cb7c 100644 --- a/app/assets/locales/en.json +++ b/app/assets/locales/en.json @@ -538,6 +538,11 @@ }, "url": { "invalid": "Invalid URL" + }, + "text_form": { + "value": { + "required": "Please enter some message" + } } }, "room": { diff --git a/app/javascript/components/admin/site_settings/administration/TextForm.jsx b/app/javascript/components/admin/site_settings/administration/TextForm.jsx index ff2567fb2a..4e17e8e51c 100644 --- a/app/javascript/components/admin/site_settings/administration/TextForm.jsx +++ b/app/javascript/components/admin/site_settings/administration/TextForm.jsx @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License along // with Greenlight; if not, see . -import React, { useEffect } from 'react'; +import React, { useCallback, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import { Button } from 'react-bootstrap'; import { useTranslation } from 'react-i18next'; @@ -25,39 +25,80 @@ import FormControl from '../../../shared_components/forms/FormControl'; import useTextForm from '../../../../hooks/forms/admin/site_settings/useTextForm'; export default function TextForm({ id, value, mutation: useUpdateSiteSettingsAPI }) { - const updateSiteSettingsAPI = useUpdateSiteSettingsAPI(); + const updateSiteSettingsAPISetText = useUpdateSiteSettingsAPI(); + const updateSiteSettingsAPIClearText = useUpdateSiteSettingsAPI(); + const { t } = useTranslation(); - const maintenanceBannerId = localStorage.getItem('maintenanceBannerId'); const { methods, fields } = useTextForm({ defaultValues: { value } }); + const formText = useRef(''); + useEffect(() => { - if (!methods) { return; } - methods.reset({ value }); + if (methods) { + methods.reset({ value }); + formText.current = value; + } }, [methods, value]); + const dismissMaintenanceBannerToast = () => { + const maintenanceBannerId = localStorage.getItem('maintenanceBannerId'); + if (maintenanceBannerId) { + toast.dismiss(maintenanceBannerId); + localStorage.removeItem('maintenanceBannerId'); + } + }; + // Function to clear the form const clearForm = () => { methods.reset({ value: '' }); - toast.dismiss(maintenanceBannerId); - updateSiteSettingsAPI.mutate(''); + dismissMaintenanceBannerToast(); + if (formText.current) { + formText.current = ''; + updateSiteSettingsAPIClearText.mutate(''); + } }; + const handleSubmit = useCallback((formData) => { + if (formText.current !== formData[`${fields.value.hookForm.id}`]) { + dismissMaintenanceBannerToast(); + formText.current = formData[`${fields.value.hookForm.id}`]; + return updateSiteSettingsAPISetText.mutate(formData); + } + return null; + }, [updateSiteSettingsAPISetText.mutate]); + return ( -
+ - - ); diff --git a/app/javascript/helpers/FileValidationHelper.jsx b/app/javascript/helpers/FileValidationHelper.jsx index 6bb24ad71f..48bf365c38 100644 --- a/app/javascript/helpers/FileValidationHelper.jsx +++ b/app/javascript/helpers/FileValidationHelper.jsx @@ -68,6 +68,6 @@ export const handleError = (error, t, toast) => { toast.error(t('toast.error.file_type_not_supported')); break; default: - toast.error(t('toast.error.file_upload_error')); + toast.error(t('toast.error.problem_completing_action')); } }; diff --git a/app/javascript/hooks/forms/admin/site_settings/useTextForm.js b/app/javascript/hooks/forms/admin/site_settings/useTextForm.js index 911624feee..dd06e9168e 100644 --- a/app/javascript/hooks/forms/admin/site_settings/useTextForm.js +++ b/app/javascript/hooks/forms/admin/site_settings/useTextForm.js @@ -23,6 +23,8 @@ import { useCallback, useMemo } from 'react'; export function useTextFormValidation() { return useMemo(() => (yup.object({ // future add text validations + value: yup.string() + .required('forms.validations.text_form.value.required'), })), []); } From f8c06ce5c5217b3e55fe68f6b5e5d7407d01d111 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:26:21 -0400 Subject: [PATCH 2/8] Translate config/locales/en.yml in pl (#5877) 100% translated source file: 'config/locales/en.yml' on 'pl'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- config/locales/pl.yml | 83 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 config/locales/pl.yml diff --git a/config/locales/pl.yml b/config/locales/pl.yml new file mode 100644 index 0000000000..0b93c0a3f1 --- /dev/null +++ b/config/locales/pl.yml @@ -0,0 +1,83 @@ +# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/. +# +# Copyright (c) 2022 BigBlueButton Inc. and by respective authors (see below). +# +# This program is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free Software +# Foundation; either version 3.0 of the License, or (at your option) any later +# version. +# +# Greenlight is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License along +# with Greenlight; if not, see . + +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t "hello" +# +# In views, this is aliased to just `t`: +# +# <%= t("hello") %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# "true": "foo" +# +# To learn more, please read the Rails Internationalization guide +# available at https://guides.rubyonrails.org/i18n.html. + +pl: + opengraph: + description: "Ucz się przy użyciu BigBlueButton, zaufanego open sourcowego rozwiązania w zakresie konferencji internetowych, które umożliwia bezproblemową wirtualną współpracę i edukację online." + meeting: + moderator_message: "By zaprosić kogoś na spotkanie, wyślij ten link:" + access_code: "Kod dostępu: %{code}" + email: + activation: + account_activation: Aktywacja konta + welcome_to_bbb: Witamy w BigBlueButton! + get_started: "Aby rozpocząć, aktywuj swoje konto, klikając przycisk poniżej." + activate_account: Aktywuj Konto + link_expires: Link wygaśnie w ciągu 24 godzin. + if_link_expires: "Jeśli link wygasł, zaloguj się i poproś o nowy e-mail aktywacyjny." + invitation: + invitation_to_join: Zaproszenie do BigBlueButton + you_have_been_invited: "Użytkownik %{name} wysłał Ci zaproszenie do utworzenia konta BigBlueButton." + get_started: "Aby się zarejestrować, kliknij przycisk poniżej i wykonaj kolejne kroki." + valid_invitation: Zaproszenie jest ważne przez 7 dni. + sign_up: Zarejestruj się + new_user_signup: + new_user: Nowa Rejestracja Użytkownika BigBlueButton + new_user_description: Nowy użytkownik zarejestrował się by używać BigBlueButton. + name: "Nazwa: %{name}" + email: "E-mail: %{email}" + admin_panel: "Panel Administratora" + take_action: "Aby wyświetlić nowego użytkownika lub podjąć niezbędne działanie, odwiedź Panel Administratora" + reset: + password_reset: Reset Hasła + password_reset_requested: "Jest nowa prośba o reset hasła dla %{email}." + password_reset_confirmation: "By zresetować hasło, Kliknij przycisk poniżej." + reset_password: Reset Hasła + link_expires: Link wygaśnie za 1 godzinę. + ignore_request: "Jeśli nie od Ciebie pochodzi dyspozycja resetu hasła, zignoruj tę wiadomość." + room: + new_room_name: "Pokój użytkownika %{username}" From 5b3d1614de435af10151f9fc15166a35a9885b51 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 10:26:34 -0400 Subject: [PATCH 3/8] Updates for file config/locales/en.yml in ja (#5868) * Translate config/locales/en.yml in ja 100% translated source file: 'config/locales/en.yml' on 'ja'. * Translate config/locales/en.yml in ja 100% translated source file: 'config/locales/en.yml' on 'ja'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- config/locales/ja.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 5f11983552..5b4e3506c2 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -63,7 +63,7 @@ ja: invitation_to_join: BigBlueButtonへの招待 you_have_been_invited: "%{name}さんから、BigBlueButtonのアカウント作成に招待されています。" get_started: 登録するには下のボタンをクリックし、手順にしたがってください。 - valid_invitation: この招待は24時間有効です。 + valid_invitation: 招待は7日間有効です。 sign_up: 登録 new_user_signup: new_user: 新しいBigBlueButtonユーザーの登録 From 81f2b6defea14ccf71d379c40deea2784a4472aa Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 13:04:06 -0400 Subject: [PATCH 4/8] Translate app/assets/locales/en.json in el (#5900) 100% translated source file: 'app/assets/locales/en.json' on 'el'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- app/assets/locales/el.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/assets/locales/el.json b/app/assets/locales/el.json index 6ea43f0b92..d20fa90f9a 100644 --- a/app/assets/locales/el.json +++ b/app/assets/locales/el.json @@ -164,6 +164,10 @@ "wrong_access_code": "Λάθος κωδικός πρόσβασης", "generate_viewers_access_code": "Δημιουργία κωδικού πρόσβασης για θεατές", "generate_mods_access_code": "Δημιουργία κωδικού πρόσβασης για συντονιστές", + "server_tag": "Επιλέξτε ένα τύπο διακομιστή για αυτή την αίθουσα", + "default_tag_name": "Προεπιλογή", + "server_tag_desired": "Επιθυμητό", + "server_tag_required": "Απαιτείται", "are_you_sure_delete_room": "Θέλετε σίγουρα να διαγράψετε αυτή την αίθουσα;" } }, @@ -274,7 +278,7 @@ "administration": { "administration": "Διαχείριση", "terms": "Όροι και Προϋποθέσεις", - "privacy": "Πολιτική απορρήτου", + "privacy": "Πολιτική Απορρήτου", "privacy_policy": "Πολιτική Απορρήτου", "change_term_links": "Αλλαγή των συνδέσμων για τους όρους χρήσης που εμφανίζονται στο κάτω μέρος της σελίδας", "change_privacy_link": "Αλλαγή του συνδέσμου για το απόρρητο που εμφανίζεται στο κάτω μέρος της σελίδας", @@ -413,7 +417,7 @@ "brand_color_updated": "Το χρώμα επωνυμίας ενημερώθηκε.", "brand_image_updated": "Η εικόνα επωνυμίας ενημερώθηκε.", "brand_image_deleted": "Η εικόνα επωνυμίας διαγράφηκε.", - "privacy_policy_updated": "Η πολιτική ιδιωτικότητας ενημερώθηκε.", + "privacy_policy_updated": "Η πολιτική απορρήτου ενημερώθηκε.", "helpcenter_updated": "Ο σύνδεσμος για το Κέντρο βοήθειας ενημερώθηκε. ", "terms_of_service_updated": "Οι όριο χρήσης ενημερώθηκαν.", "maintenance_updated": "Το μήνυμα της λειτουργίας συντήρησης ενημερώθηκε." @@ -437,6 +441,7 @@ }, "error": { "problem_completing_action": "Παρουσιάστηκε πρόβλημα σε αυτή την ενέργεια.\nΠαρακαλούμε δοκιμάστε ξανά.", + "server_type_unavailable": "Ο επιθυμητός τύπος διακομιστή δεν είναι διαθέσιμος. Παρακαλούμε επιλέξτε διαφορετικό τύπο από τις ρυθμίσεις αίθουσας. ", "file_type_not_supported": "Ο τύπος αρχείου δεν υποστηρίζεται.", "file_size_too_large": "Το μέγεθος αρχείου είναι πολύ μεγάλο.", "file_upload_error": "Το αρχείο δεν μπορεί να μεταφορτωθεί.", @@ -533,6 +538,11 @@ }, "url": { "invalid": "Μη έγκυρο URL" + }, + "text_form": { + "value": { + "required": "Παρακαλούμε πληκτρολογήστε το μήνυμά σας" + } } }, "room": { From ce758868961fcea1998a84b5637abe7693e5df58 Mon Sep 17 00:00:00 2001 From: Ali Hadi Mazeh <91922430+alihadimazeh@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:37:50 -0400 Subject: [PATCH 5/8] Role mapping message shows the proper way to use (#5901) --- app/assets/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/locales/en.json b/app/assets/locales/en.json index c701b5cb7c..d3ddd9c7ab 100644 --- a/app/assets/locales/en.json +++ b/app/assets/locales/en.json @@ -307,7 +307,7 @@ "registration": { "registration": "Registration", "role_mapping_by_email": "Role Mapping By Email", - "role_mapping_by_email_description": "Map the user to a role using their email. Must be in the format: role1=email1, role2=email2", + "role_mapping_by_email_description": "Map the user to a role using their email. Must be in the format: role1=email1,role2=email2", "enter_role_mapping_rule": "Enter a role mapping rule", "resync_on_login": "Resync User Data On Every Sign In", "resync_on_login_description": "Resync a user's information every time they sign in, making the external authentication provider always match the information in Greenlight", From d3a7e2340f4f4a4a102aa61cf6aafbd229f52410 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 09:46:00 -0400 Subject: [PATCH 6/8] Translate app/assets/locales/en.json in el (#5902) 100% translated source file: 'app/assets/locales/en.json' on 'el'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- app/assets/locales/el.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/locales/el.json b/app/assets/locales/el.json index d20fa90f9a..c78670ced6 100644 --- a/app/assets/locales/el.json +++ b/app/assets/locales/el.json @@ -307,7 +307,7 @@ "registration": { "registration": "Εγγραφή", "role_mapping_by_email": "Εκχώρηση ρόλου με email", - "role_mapping_by_email_description": "Εκχώρηση ρόλου σε χρήστη με χρήση του email του. Πρέπει να είναι όπως: role1=email1, role2=email2", + "role_mapping_by_email_description": "Κατανείμετε το ρόλο χρήστη σύμφωνα με το email. Πρέπει να έχει τη μορφή role1=email1,role2=email2", "enter_role_mapping_rule": "Εισαγάγετε ένα κανόνα εκχώρησης ρόλου", "resync_on_login": "Συγχρονισμός δεδομένων χρήστη σε κάθε σύνδεση", "resync_on_login_description": "Επανασυγχρονισμός των πληροφοριών χρήστη σε κάθε σύνδεση, υποχρεώνοντας τον εξωτερικό πάροχο αυθεντικοποίησης σε συνεχή επιβεβαίωση των πληροφοριών στο Greenlight", From 5bd1fe729c0a926a884247d3d3003d5daad6aa31 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 09:46:08 -0400 Subject: [PATCH 7/8] Translate app/assets/locales/en.json in fa_IR (#5905) 100% translated source file: 'app/assets/locales/en.json' on 'fa_IR'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- app/assets/locales/fa_IR.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/assets/locales/fa_IR.json b/app/assets/locales/fa_IR.json index 1a1097fa7b..9aaa729a0c 100644 --- a/app/assets/locales/fa_IR.json +++ b/app/assets/locales/fa_IR.json @@ -164,6 +164,10 @@ "wrong_access_code": "کد دسترسی اشتباه است", "generate_viewers_access_code": "ایجاد کد دسترسی برای بینندگان", "generate_mods_access_code": "ایجاد کد دسترسی برای مدیران", + "server_tag": "نوع سرور برای این اتاق انتخاب کنید", + "default_tag_name": "پیش‌فرض", + "server_tag_desired": "دلخواه", + "server_tag_required": "الزامی است", "are_you_sure_delete_room": "آیا مطمئن هستید که می‌خواهید این اتاق را حذف کنید؟" } }, @@ -274,8 +278,8 @@ "administration": { "administration": "مدیریت", "terms": "شرایط و ضوابط", - "privacy": "سیاست حفظ حریم خصوصی", - "privacy_policy": "سیاست حفظ حریم خصوصی", + "privacy": "اطلاعیه حفظ حریم خصوصی", + "privacy_policy": "اطلاعیه حفظ حریم خصوصی", "change_term_links": "تغییر پیوندهای مقررات که در پایین صفحه نمایان می‌شوند", "change_privacy_link": "پیوند حریم خصوصی که در پایین صفحه نمایان می‌شود را تغییر دهید", "helpcenter": "مرکز راهنمایی", @@ -413,7 +417,7 @@ "brand_color_updated": "رنگ برند به‌روز شده‌است.", "brand_image_updated": "تصویر برند به‌روز شده‌است.", "brand_image_deleted": "تصویر برند حذف شده‌است.", - "privacy_policy_updated": "سیاست حفظ حریم خصوصی به‌روز شده‌است.", + "privacy_policy_updated": "اطلاعیه حفظ حریم خصوصی به‌روز شده است.", "helpcenter_updated": "پیوند مرکز راهنمایی به‌روز شده است.", "terms_of_service_updated": "شرایط خدمات به‌روز شده‌است.", "maintenance_updated": "اعلامیهٔ حالت تعمیر به‌روز شده است." @@ -437,6 +441,7 @@ }, "error": { "problem_completing_action": "این عمل نمی‌تواند تکمیل شود.\nلطفا دوباره تلاش کنید.", + "server_type_unavailable": "نوع سرور مورد نظر در دسترس نیست. لطفا نوع دیگری را در تنظیمات اتاق انتخاب کنید.", "file_type_not_supported": "نوع پرونده پشتیبانی نمی‌شود.", "file_size_too_large": "اندازهٔ پرونده خیلی بزرگ است.", "file_upload_error": "پرونده نمی‌تواند بارگذاری شود.", @@ -533,6 +538,11 @@ }, "url": { "invalid": "نشانی اینترنتی معتبر نیست" + }, + "text_form": { + "value": { + "required": "لطفا یک پیام وارد کنید" + } } }, "room": { From 3f025cccf49c5cbb8c94132ac1d5a292f7486a18 Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Wed, 31 Jul 2024 09:46:33 -0400 Subject: [PATCH 8/8] Fix logo redirect to home page (#5904) --- app/javascript/components/shared_components/Header.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/javascript/components/shared_components/Header.jsx b/app/javascript/components/shared_components/Header.jsx index 614fed0688..5ff423a3b5 100644 --- a/app/javascript/components/shared_components/Header.jsx +++ b/app/javascript/components/shared_components/Header.jsx @@ -29,7 +29,9 @@ export default function Header() { const currentUser = useAuth(); let homePath = '/'; - if (currentUser?.permissions?.CreateRoom === 'false') { + if (currentUser?.permissions?.CreateRoom === 'true') { + homePath = '/rooms'; + } else if (currentUser?.permissions?.CreateRoom === 'false') { homePath = '/home'; }