diff --git a/crates/directory/src/core/principal.rs b/crates/directory/src/core/principal.rs index 7e9d6f67..63989c3c 100644 --- a/crates/directory/src/core/principal.rs +++ b/crates/directory/src/core/principal.rs @@ -358,11 +358,17 @@ impl PrincipalSet { // SPDX-SnippetBegin // SPDX-FileCopyrightText: 2020 Stalwart Labs LLC // SPDX-License-Identifier: LicenseRef-SEL + #[cfg(feature = "enterprise")] pub fn tenant(&self) -> Option { self.get_int(PrincipalField::Tenant).map(|v| v as u32) } // SPDX-SnippetEnd + #[cfg(not(feature = "enterprise"))] + pub fn tenant(&self) -> Option { + 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 // SPDX-License-Identifier: LicenseRef-SEL + #[cfg(feature = "enterprise")] pub const fn is_tenant_admin_permission(&self) -> bool { matches!( self,