admin/fs: prevent user from setting can_read on root, as it is not supported yet

Massimo Melina committed May 15, 2022 at 21:00 UTC b1e6dc71282e12366aa46b478c1a1b0bd8390757
1 file changed +1 -1
admin/src/FileForm.ts
+1 -1
@@ -83,7 +83,7 @@ export default function FileForm({ file }: { file: VfsNode }) {
83 },
84 isRoot ? { k: 'source', comp: FileField, files: false, helperText: "If you specify a folder here, its files will be listed in the home" }
85 : (hasSource && { k: 'source', comp: DisplayField, multiline: true }),
86 - { k: 'can_read', label:"Who can download", xl: showCanSee && 6, comp: WhoField, parent, accounts, inherit: inheritedPerms.can_read,
86 + !isRoot && { k: 'can_read', label:"Who can download", xl: showCanSee && 6, comp: WhoField, parent, accounts, inherit: inheritedPerms.can_read,
87 helperText: "Note: who can't download won't see it in the list"
88 },
89 showCanSee && { k: 'can_see', label:"Who can see", xl: 6, comp: WhoField, parent, accounts, inherit: inheritedPerms.can_see,