This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user