X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3e620538c5c0431bc587bb4c92da8c483f22a053..589629e80967dc1f318561fbe6a4174e1da231a6:/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx

diff --git a/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx b/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx
index c8db68dcf6..5aec8febed 100644
--- a/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx
+++ b/src/views-components/sharing-dialog/sharing-invitation-form-component.tsx
@@ -5,7 +5,7 @@
 import * as React from 'react';
 import { Field, WrappedFieldProps, FieldArray, WrappedFieldArrayProps } from 'redux-form';
 import { Grid, FormControl, InputLabel } from '@material-ui/core';
-import { PermissionSelect } from './permission-select';
+import { PermissionSelect, parsePermissionLevel, formatPermissionLevel } from './permission-select';
 import { PeopleSelect, Person } from './people-select';
 
 export default () =>
@@ -27,14 +27,15 @@ const InvitedPeopleField = () =>
 const InvitedPeopleFieldComponent = ({ fields }: WrappedFieldArrayProps<Person>) =>
     <PeopleSelect
         items={fields.getAll() || []}
-        onCreate={fields.push}
         onSelect={fields.push}
         onDelete={fields.remove} />;
 
 const PermissionSelectField = () =>
     <Field
-        name='permission'
-        component={PermissionSelectComponent} />;
+        name='permissions'
+        component={PermissionSelectComponent}
+        format={formatPermissionLevel}
+        parse={parsePermissionLevel} />;
 
 const PermissionSelectComponent = ({ input }: WrappedFieldProps) =>
     <FormControl fullWidth>
