class B2BucketTypeFeature extends DefaultAclFeature implements AclPermission, Location {

    @Override
    public Name getLocation(final Path file) {
        final Path container = containerService.getContainer(file);
        if(container.isRoot()) {
            return unknown;
        }
        for(Acl.UserAndRole role : container.attributes().getAcl().asList()) {
            if(role.getUser().equals(new Acl.GroupUser(Acl.GroupUser.EVERYONE))) {
                if(role.getRole().equals(new Acl.Role(Acl.Role.READ))) {
                    return new B2BucketTypeName(BucketType.allPublic);
                }
            }
        }
        return new B2BucketTypeName(BucketType.allPrivate);
    }

    public  B2BucketTypeFeature(final B2Session session, final B2FileidProvider fileid);

}