Skip to content

Commit

Permalink
feat: make public folders a config opt-in
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelDeimos committed Aug 14, 2024
1 parent 461ea3e commit 209555c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/backend/src/services/auth/ACLService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 209555c

Please sign in to comment.