Add is_ip_in_cidr expression function for CIDR matching

This commit is contained in:
Maurus Decimus
2026-05-08 09:21:21 +02:00
parent fb21c15f22
commit b455951c11
6 changed files with 29 additions and 32 deletions

View File

@@ -28,11 +28,8 @@ use crate::registry::{
},
};
use common::{
Server,
auth::AccessToken,
cache::invalidate::CacheInvalidationBuilder,
expr::if_block::BootstrapExprExt,
ipc::{BroadcastEvent, CacheInvalidation, RegistryChange},
Server, auth::AccessToken, cache::invalidate::CacheInvalidationBuilder,
expr::if_block::BootstrapExprExt, ipc::CacheInvalidation,
};
use http_proto::HttpSessionData;
use jmap_proto::{
@@ -681,30 +678,6 @@ impl RegistrySet for Server {
// Finalize cache invalidation
self.invalidate_caches(cache_invalidator).await?;
// Sieve scripts: refresh the in-memory compiled script maps
if matches!(
object_type,
ObjectType::SieveUserScript | ObjectType::SieveSystemScript
) && (!set.response.created.is_empty()
|| !set.response.updated.is_empty()
|| !set.response.destroyed.is_empty())
{
let result = Box::pin(
set.server
.reload_registry(RegistryChange::Reload(object_type)),
)
.await?;
if !result.has_errors() {
set.server
.cluster_broadcast(BroadcastEvent::RegistryChange(
RegistryChange::Reload(object_type),
))
.await;
} else {
result.log();
}
}
Ok(set.into_response())
}
ObjectType::ArfExternalReport