X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a672dd5efb4c8ef394f61a7e7a5e513f80bf1427..2a7fd99c212c33a1ec9911f8529fa5afc59a7bb2:/src/views-components/sharing-dialog/sharing-public-access-form.tsx

diff --git a/src/views-components/sharing-dialog/sharing-public-access-form.tsx b/src/views-components/sharing-dialog/sharing-public-access-form.tsx
index 8ee1d94dbe..eb337c38ad 100644
--- a/src/views-components/sharing-dialog/sharing-public-access-form.tsx
+++ b/src/views-components/sharing-dialog/sharing-public-access-form.tsx
@@ -10,15 +10,19 @@ import { SHARING_PUBLIC_ACCESS_FORM_NAME, VisibilityLevel } from 'store/sharing-
 import { RootState } from 'store/store';
 import { getSharingPublicAccessFormData } from '../../store/sharing-dialog/sharing-dialog-types';
 
+interface SaveProps {
+    onSave: () => void;
+}
+
 export const SharingPublicAccessForm = compose(
-    reduxForm(
+    reduxForm<{}, SaveProps>(
         { form: SHARING_PUBLIC_ACCESS_FORM_NAME }
     ),
     connect(
         (state: RootState) => {
             const { visibility } = getSharingPublicAccessFormData(state) || { visibility: VisibilityLevel.PRIVATE };
-            return { visibility };
+            const includePublic = state.auth.config.clusterConfig.Users.AnonymousUserToken.length > 0;
+            return { visibility, includePublic };
         }
     )
 )(SharingPublicAccessFormComponent);
-
