mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 22:03:50 +03:00
ChannelPermissions: fix sig/nosig mismatch
This commit is contained in:
parent
91fbf81e74
commit
456d7f29af
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user