Exclude SEL licensed code from AGPL licensed code (closes #783 closes #768)

This commit is contained in:
mdecimus
2025-07-21 12:48:19 +02:00
parent 9310083222
commit 4d819a1041

View File

@@ -358,11 +358,17 @@ impl PrincipalSet {
// SPDX-SnippetBegin
// SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
// SPDX-License-Identifier: LicenseRef-SEL
#[cfg(feature = "enterprise")]
pub fn tenant(&self) -> Option<u32> {
self.get_int(PrincipalField::Tenant).map(|v| v as u32)
}
// SPDX-SnippetEnd
#[cfg(not(feature = "enterprise"))]
pub fn tenant(&self) -> Option<u32> {
None
}
pub fn description(&self) -> Option<&str> {
self.get_str(PrincipalField::Description)
}
@@ -1421,10 +1427,16 @@ impl Permission {
)
}
#[cfg(not(feature = "enterprise"))]
pub const fn is_tenant_admin_permission(&self) -> bool {
false
}
// SPDX-SnippetBegin
// SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
// SPDX-License-Identifier: LicenseRef-SEL
#[cfg(feature = "enterprise")]
pub const fn is_tenant_admin_permission(&self) -> bool {
matches!(
self,