One edition: the last enterprise gates come out of shared code (SPEC 2.3)
Every one of the 14 was `#[cfg(not(feature = "enterprise"))]` on the arm the fork always compiles: the Enterprise arms went with the import, and nothing turns the feature on. Removing the attribute leaves the same code, now unconditional, in 11 files. Two of them looked like behavior worth checking before touching: the `validate_tenant_quota` stub that always passes, and the refusal to cancel a pending DestroyAccount task. The stub is vestigial — the rebuilt multi-tenancy enforces quotas in `crates/features/src/tenancy/quota.rs` for those objects and more — and the refusal is undelete's open question, which this change leaves exactly as it was. The binary builds with no new warnings, and `system_tests` and `jmap_tests`, which cover the touched registry, task-manager and auth paths, both pass. The feature definitions stay in the manifests, inert: taking them out would widen every sync's diff for nothing.
This commit is contained in:
Vendored
-1
@@ -130,7 +130,6 @@ impl Server {
|
|||||||
|
|
||||||
// Update tracers
|
// Update tracers
|
||||||
|
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
tracers.update();
|
tracers.update();
|
||||||
|
|
||||||
// Reload queue settings
|
// Reload queue settings
|
||||||
|
|||||||
@@ -157,7 +157,6 @@ impl BootManager {
|
|||||||
// Enable telemetry
|
// Enable telemetry
|
||||||
|
|
||||||
|
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
telemetry.enable();
|
telemetry.enable();
|
||||||
|
|
||||||
if bootstrap.registry.is_bootstrap_mode() {
|
if bootstrap.registry.is_bootstrap_mode() {
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ impl Server {
|
|||||||
|
|
||||||
// inbuxa: BT-9: the first logo mail can carry inline; none leaves the
|
// inbuxa: BT-9: the first logo mail can carry inline; none leaves the
|
||||||
// built-in INBUXA logo
|
// built-in INBUXA logo
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
pub async fn logo_resource(
|
pub async fn logo_resource(
|
||||||
&self,
|
&self,
|
||||||
domain: &str,
|
domain: &str,
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ impl AccountApiHandler for Server {
|
|||||||
&self,
|
&self,
|
||||||
access_token: &AccessToken,
|
access_token: &AccessToken,
|
||||||
) -> trc::Result<HttpResponse> {
|
) -> trc::Result<HttpResponse> {
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
let edition = "oss";
|
let edition = "oss";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -397,7 +397,6 @@ impl RegistryGet for Server {
|
|||||||
ObjectType::ArchivedItem => crate::inbuxa::undelete::get(get)
|
ObjectType::ArchivedItem => crate::inbuxa::undelete::get(get)
|
||||||
.await
|
.await
|
||||||
.map(|get| get.into_response()),
|
.map(|get| get.into_response()),
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
#[allow(unreachable_patterns)] // inbuxa: every object type has an arm now
|
#[allow(unreachable_patterns)] // inbuxa: every object type has an arm now
|
||||||
_ => Ok(get.not_found_any().into_response()),
|
_ => Ok(get.not_found_any().into_response()),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -345,7 +345,6 @@ pub(crate) async fn validate_role(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
pub async fn validate_tenant_quota(
|
pub async fn validate_tenant_quota(
|
||||||
_server: &Server,
|
_server: &Server,
|
||||||
_access_token: &AccessToken,
|
_access_token: &AccessToken,
|
||||||
@@ -360,7 +359,6 @@ pub async fn schedule_account_destruction(
|
|||||||
account: &Account,
|
account: &Account,
|
||||||
) -> trc::Result<()> {
|
) -> trc::Result<()> {
|
||||||
|
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
let status = TaskStatus::now();
|
let status = TaskStatus::now();
|
||||||
|
|
||||||
let (account_domain_id, account_name, account_type) = match account {
|
let (account_domain_id, account_name, account_type) = match account {
|
||||||
|
|||||||
@@ -264,7 +264,6 @@ pub(crate) async fn task_set(
|
|||||||
let due = task.due_timestamp();
|
let due = task.due_timestamp();
|
||||||
|
|
||||||
|
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
if let Task::DestroyAccount(_) = task {
|
if let Task::DestroyAccount(_) = task {
|
||||||
set.response.not_destroyed.append(
|
set.response.not_destroyed.append(
|
||||||
id,
|
id,
|
||||||
|
|||||||
@@ -907,7 +907,6 @@ impl RegistrySet for Server {
|
|||||||
set.fail_all_destroy("Telemetry objects cannot be deleted");
|
set.fail_all_destroy("Telemetry objects cannot be deleted");
|
||||||
Ok(set.into_response())
|
Ok(set.into_response())
|
||||||
}
|
}
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
#[allow(unreachable_patterns)] // inbuxa: ArchivedItem was the last one
|
#[allow(unreachable_patterns)] // inbuxa: ArchivedItem was the last one
|
||||||
_ => {
|
_ => {
|
||||||
set.fail_all_create("Enterprise objects cannot be created");
|
set.fail_all_create("Enterprise objects cannot be created");
|
||||||
|
|||||||
@@ -554,7 +554,6 @@ async fn build_template(
|
|||||||
|
|
||||||
|
|
||||||
// inbuxa: BT-11, BT-18: the operator's template, read now, else the built-in
|
// inbuxa: BT-11, BT-18: the operator's template, read now, else the built-in
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
let custom = inbuxa_features::branding::templates::stored(
|
let custom = inbuxa_features::branding::templates::stored(
|
||||||
server.registry(),
|
server.registry(),
|
||||||
inbuxa_features::branding::templates::Which::Alarm,
|
inbuxa_features::branding::templates::Which::Alarm,
|
||||||
@@ -562,7 +561,6 @@ async fn build_template(
|
|||||||
.await
|
.await
|
||||||
.ok()
|
.ok()
|
||||||
.flatten();
|
.flatten();
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
let template = custom.as_ref().unwrap_or(&server.core.groupware.alarms_template);
|
let template = custom.as_ref().unwrap_or(&server.core.groupware.alarms_template);
|
||||||
let formatter = TextFormatter::new(account_info.locale().as_str())?;
|
let formatter = TextFormatter::new(account_info.locale().as_str())?;
|
||||||
let locale = formatter.locale;
|
let locale = formatter.locale;
|
||||||
|
|||||||
@@ -324,7 +324,6 @@ pub async fn build_itip_template(
|
|||||||
logo_cid: &str,
|
logo_cid: &str,
|
||||||
) -> trc::Result<Details> {
|
) -> trc::Result<Details> {
|
||||||
// inbuxa: BT-11, BT-18: the operator's template, read now, else the built-in
|
// inbuxa: BT-11, BT-18: the operator's template, read now, else the built-in
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
let custom = inbuxa_features::branding::templates::stored(
|
let custom = inbuxa_features::branding::templates::stored(
|
||||||
server.registry(),
|
server.registry(),
|
||||||
inbuxa_features::branding::templates::Which::Invite,
|
inbuxa_features::branding::templates::Which::Invite,
|
||||||
@@ -332,7 +331,6 @@ pub async fn build_itip_template(
|
|||||||
.await
|
.await
|
||||||
.ok()
|
.ok()
|
||||||
.flatten();
|
.flatten();
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
let template = custom.as_ref().unwrap_or(&server.core.groupware.itip_template);
|
let template = custom.as_ref().unwrap_or(&server.core.groupware.itip_template);
|
||||||
let formatter = TextFormatter::new(account_info.locale().as_str())?;
|
let formatter = TextFormatter::new(account_info.locale().as_str())?;
|
||||||
let locale = formatter.locale;
|
let locale = formatter.locale;
|
||||||
|
|||||||
@@ -581,7 +581,6 @@ async fn build_contact_document(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(not(feature = "enterprise"))]
|
|
||||||
// inbuxa: MON-16: a trace's search document, when trace search is on:
|
// inbuxa: MON-16: a trace's search document, when trace search is on:
|
||||||
// its event types, queue ids, and addresses, their domains, hosts, IPs,
|
// its event types, queue ids, and addresses, their domains, hosts, IPs,
|
||||||
// message ids and account names as keywords
|
// message ids and account names as keywords
|
||||||
|
|||||||
+7
-1
@@ -178,7 +178,13 @@ checks already are: 30 checks across 18 files at the commit above. That keeps
|
|||||||
each sync's conflicts few and predictable.
|
each sync's conflicts few and predictable.
|
||||||
|
|
||||||
The `enterprise` Cargo feature and every edition check are removed. There is
|
The `enterprise` Cargo feature and every edition check are removed. There is
|
||||||
one edition.
|
one edition. Done for the code on 2026-09-19: the last 14 gates, all of them
|
||||||
|
`#[cfg(not(feature = "enterprise"))]` on the path the fork always takes, came
|
||||||
|
off across 11 files, and no `is_enterprise_edition()` check survived the
|
||||||
|
import. The feature's *definitions* stay in the manifests, inert now that
|
||||||
|
nothing turns them on and nothing reads them, because removing them would
|
||||||
|
widen every sync's diff for no gain (§2.2). An import that changes a gated
|
||||||
|
file brings its gates back in the merge; they come off again with it.
|
||||||
|
|
||||||
One exception: scale-out storage lives in new AGPL files inside
|
One exception: scale-out storage lives in new AGPL files inside
|
||||||
`crates/store` (`backend/scaleout/`), because the rebuilt-features crate
|
`crates/store` (`backend/scaleout/`), because the rebuilt-features crate
|
||||||
|
|||||||
Reference in New Issue
Block a user