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,10 +56,12 @@ class ACLService extends BaseService {
}
// Hard rule: anyone and anything can read /user/public directories
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
if ( actor.type instanceof AccessTokenActorType ) {