Skip to content

Commit

Permalink
Allow static public access.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Nov 6, 2024
1 parent 41a4088 commit dd824f8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public abstract class DefaultAclFeature implements AclPermission {
public Acl getDefault(final EnumSet<Path.Type> type) {
if(preferences.getBoolean("queue.upload.permissions.default")) {
if(type.contains(Path.Type.file)) {
return this.toAcl(new Permission(preferences.getInteger("queue.upload.permissions.file.default")));
return toAcl(new Permission(preferences.getInteger("queue.upload.permissions.file.default")));
}
else {
return this.toAcl(new Permission(preferences.getInteger("queue.upload.permissions.folder.default")));
return toAcl(new Permission(preferences.getInteger("queue.upload.permissions.folder.default")));
}
}
return Acl.EMPTY;
Expand All @@ -49,10 +49,10 @@ public Acl getDefault(final Path file, final Local local) throws BackgroundExcep
return this.getDefault(local.getType());
}
// Read permissions from local file
return this.toAcl(local.attributes().getPermission());
return toAcl(local.attributes().getPermission());
}

private Acl toAcl(final Permission permission) {
public static Acl toAcl(final Permission permission) {
final Acl acl = new Acl();
if(permission.getOther().implies(Permission.Action.read)) {
acl.addAll(new Acl.GroupUser(Acl.GroupUser.EVERYONE), new Acl.Role(Acl.Role.READ));
Expand Down

0 comments on commit dd824f8

Please sign in to comment.