From 77e9ceb4e0d0b61cf9f280349458b32a9f933610 Mon Sep 17 00:00:00 2001 From: Mushka Nikita Date: Wed, 28 Jun 2023 11:51:22 +0300 Subject: [PATCH] update security --- .../src/components/dialogs/SubmitToFormGallery/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/dialogs/SubmitToFormGallery/index.js b/packages/client/src/components/dialogs/SubmitToFormGallery/index.js index b54eebd6bf..1c46da31dd 100644 --- a/packages/client/src/components/dialogs/SubmitToFormGallery/index.js +++ b/packages/client/src/components/dialogs/SubmitToFormGallery/index.js @@ -68,6 +68,7 @@ const SubmitToFormGallery = ({ formItem, setFormItem, currentColorScheme, + canSubmitToFormGallery, }) => { const [isSelectingForm, setIsSelectingForm] = useState(false); const onOpenFormSelector = () => setIsSelectingForm(true); @@ -89,6 +90,8 @@ const SubmitToFormGallery = ({ formItem && setFormItem(null); }; + if (!canSubmitToFormGallery()) return null; + if (isSelectingForm) return (
{t("FormGallery:SubmitToGalleryDialogMainInfo")}
+ {/* TODO-mushka add correct link to guide */} ({ +export default inject(({ auth, accessRightsStore, dialogsStore }) => ({ visible: dialogsStore.submitToGalleryDialogVisible, setVisible: dialogsStore.setSubmitToGalleryDialogVisible, formItem: dialogsStore.formItem, setFormItem: dialogsStore.setFormItem, currentColorScheme: auth.settingsStore.currentColorScheme, + canSubmitToFormGallery: accessRightsStore.canSubmitToFormGallery, }))(withTranslation("Common", "FormGallery")(observer(SubmitToFormGallery)));