Skip to content

Commit

Permalink
fix: (regression 0.49.0) admin/fs: couldn't reset a permission to its…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
rejetto committed Oct 23, 2023
1 parent 8fd17af commit 4adc8af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions admin/src/FileForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@ export default function FileForm({ file, anyMask, addToBar, statusApi }: FileFor

function perm(perm: keyof VfsPerms, helperText?: ReactNode, props: Partial<WhoFieldProps>={}) {
return {
comp: WhoField,
k: perm, lg: 6, xl: 4,
parent, accounts, helperText, isDir,
showInherited: anyMask, // with masks, you may need to set a permission to override the mask
otherPerms: _.without(Object.keys(defaultPerms), perm).map(x => ({ value: x, label: "As " +perm2word(x) })),
k: perm, lg: 6, xl: 4, comp: WhoField, parent, accounts, helperText,
label: "Who can " + perm2word(perm),
inherit: file.inherited?.[perm] ?? defaultPerms[perm],
byMasks: byMasks?.[perm],
isDir,
fromField: (v?: Who) => v ?? null,
...props
}
}
Expand Down

0 comments on commit 4adc8af

Please sign in to comment.