ChannelPermissions: fix sig/nosig mismatch

This commit is contained in:
Liam Fitzgerald 2021-02-09 12:36:55 +10:00
parent 91fbf81e74
commit 456d7f29af
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
2 changed files with 4 additions and 5 deletions

View File

@ -98,7 +98,7 @@ type Value<I extends string> = {
const shipItemSchema = Yup.string().test(
"is-patp",
"${value} is not a valid @p",
ob.isValidPatp
x => ob.isValidPatp(`~${x}`)
);
export const shipSearchSchema = Yup.array(shipItemSchema).compact();

View File

@ -96,13 +96,12 @@ export function GraphPermissions(props: GraphPermissionsProps) {
const initialValues = {
writePerms,
writers: Array.from(writers)
.filter((x) => x !== hostShip)
.map((s) => `~${s}`),
.filter((x) => x !== hostShip),
readerComments: association.metadata.vip === "reader-comments",
};
const onSubmit = async (values: FormSchema, actions) => {
values.writers = _.compact(values.writers);
values.writers = _.map(_.compact(values.writers), x => `~${x}`);
const resource = resourceFromPath(association.group);
const tag = {
app: "graph",
@ -152,7 +151,7 @@ export function GraphPermissions(props: GraphPermissionsProps) {
}
};
const schema = formSchema(Array.from(group.members).map((m) => `~${m}`));
const schema = formSchema(Array.from(group.members));
return (
<Formik