FIX: allow staff to upload when they should and authorized_extensions is blank (#15136)

Allow staff to upload when authorized_extensions is blank, but
authorized_extensions_for_staff is not
This commit is contained in:
Jeff Wong 2021-11-29 19:40:54 -10:00 committed by GitHub
parent 0edacbd8f7
commit 9896fc7d33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,7 +202,11 @@ export function authorizesOneOrMoreExtensions(staff, siteSettings) {
return (
siteSettings.authorized_extensions.split("|").filter((ext) => ext).length >
0
0 ||
(siteSettings.authorized_extensions_for_staff
.split("|")
.filter((ext) => ext).length > 0 &&
staff)
);
}