Struct kanidmd_lib::schema::SchemaClass
source · pub struct SchemaClass {
pub name: AttrString,
pub uuid: Uuid,
pub description: String,
pub sync_allowed: bool,
pub systemmay: Vec<AttrString>,
pub may: Vec<AttrString>,
pub systemmust: Vec<AttrString>,
pub must: Vec<AttrString>,
pub systemsupplements: Vec<AttrString>,
pub supplements: Vec<AttrString>,
pub systemexcludes: Vec<AttrString>,
pub excludes: Vec<AttrString>,
}
Expand description
An item representing a class and the rules for that class. These rules enforce that an
Entry
’s avas conform to a set of requirements, giving structure to an entry about
what avas must or may exist. The kanidm project provides attributes in systemmust
and
systemmay
, which can not be altered. An administrator may extend these in the must
and may
attributes.
Classes are additive, meaning that if there are two classes, the may
rules of both union,
and that if an attribute is must
on one class, and may
in another, the must
rule
takes precedence. It is not possible to combine classes in an incompatible way due to these
rules.
That in mind, and entry that has one of every possible class would probably be nonsensical,
but the addition rules make it easy to construct and understand with concepts like access
controls or accounts and posix extensions.
Fields§
§name: AttrString
§uuid: Uuid
§description: String
§sync_allowed: bool
§systemmay: Vec<AttrString>
This allows modification of system types to be extended in custom ways
may: Vec<AttrString>
§systemmust: Vec<AttrString>
§must: Vec<AttrString>
§systemsupplements: Vec<AttrString>
A list of classes that this extends. These are an “or”, as at least one of the supplementing classes must also be present. Think of this as “inherits toward” or “provides”. This is just as “strict” as requires but operates in the opposite direction allowing a tree structure.
supplements: Vec<AttrString>
§systemexcludes: Vec<AttrString>
A list of classes that can not co-exist with this item at the same time.
excludes: Vec<AttrString>
Implementations§
source§impl SchemaClass
impl SchemaClass
pub fn try_from( value: &Entry<EntrySealed, EntryCommitted> ) -> Result<Self, OperationError>
sourcepub fn may_iter(&self) -> impl Iterator<Item = &AttrString>
pub fn may_iter(&self) -> impl Iterator<Item = &AttrString>
An iterator over the full set of attrs that may or must exist on this class.
Trait Implementations§
source§impl Clone for SchemaClass
impl Clone for SchemaClass
source§fn clone(&self) -> SchemaClass
fn clone(&self) -> SchemaClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more