feat: make public folders a config opt-in

This commit is contained in:
KernelDeimos 2024-08-14 17:19:23 -04:00 committed by Eric Dubé
parent 461ea3eae6
commit 209555c1d9

View File

@ -56,9 +56,11 @@ class ACLService extends BaseService {
}
// Hard rule: anyone and anything can read /user/public directories
const public_modes = ['read', 'list', 'see'];
if ( public_modes.includes(mode) ) {
if ( await fsNode.isPublic() ) return true;
if ( this.global_config.enable_public_folders ) {
const public_modes = ['read', 'list', 'see'];
if ( public_modes.includes(mode) ) {
if ( await fsNode.isPublic() ) return true;
}
}
// Access tokens only work if the authorizer has permission