pub struct SecurityLevelsResource<'a> { /* private fields */ }Expand description
client.security_levels()
Implementations§
Source§impl<'a> SecurityLevelsResource<'a>
impl<'a> SecurityLevelsResource<'a>
Sourcepub fn create(
&self,
id: impl Display,
body: &PostSecuritylevelsIdBody,
) -> Result<PostSecuritylevelsIdResponse>
pub fn create( &self, id: impl Display, body: &PostSecuritylevelsIdBody, ) -> Result<PostSecuritylevelsIdResponse>
Create a new security Level
POST /securitylevels/{id}
Creates a security level. Choose a free ID between 1 and 99997 to insert a level without renumbering existing levels. Requires “edit masterdata” in “churchdb”.
§Example
let body = models::PostSecuritylevelsIdBody {
name: Some("Hauskreis Nord".into()),
..Default::default()
};
let result = client.security_levels().create(1, &body)?;
println!("{}", result.name);Sourcepub fn delete(&self, id: impl Display) -> Result<()>
pub fn delete(&self, id: impl Display) -> Result<()>
Delete the Security Level
DELETE /securitylevels/{id}
Delete a security level
Use Self::delete_with to pass query parameters.
§Example
client.security_levels().delete(1)?;Sourcepub fn delete_with(
&self,
id: impl Display,
query: &DeleteSecuritylevelsIdQuery,
) -> Result<()>
pub fn delete_with( &self, id: impl Display, query: &DeleteSecuritylevelsIdQuery, ) -> Result<()>
Delete the Security Level
Like Self::delete, with query parameters.
DELETE /securitylevels/{id}
Delete a security level
Sourcepub fn get(&self, id: impl Display) -> Result<SecurityLevel>
pub fn get(&self, id: impl Display) -> Result<SecurityLevel>
Get a particular security level
GET /securitylevels/{id}
Get a particular Security Level
§Example
let security_level = client.security_levels().get(1)?;
println!("{}", security_level.name);Sourcepub fn list(&self) -> Result<Vec<SecurityLevel>>
pub fn list(&self) -> Result<Vec<SecurityLevel>>
get all securitylevels
GET /securitylevels
Returns hierarchical access thresholds, not an independent display order. Lower levels are included in higher levels. IDs may change during order-preserving renumbering; internal references are updated automatically, while external integrations must refresh stored mappings.
§Example
for security_level in client.security_levels().list()? {
println!("{}", security_level.name);
}Sourcepub fn patch(
&self,
id: impl Display,
body: &PatchSecuritylevelsIdBody,
) -> Result<PatchSecuritylevelsIdResponse>
pub fn patch( &self, id: impl Display, body: &PatchSecuritylevelsIdBody, ) -> Result<PatchSecuritylevelsIdResponse>
Update the security level
PATCH /securitylevels/{id}
Changes the security level. ID changes must preserve the relative order of all existing security levels. Requires “edit masterdata” in “churchdb”.
Use Self::patch_with to pass query parameters.
§Example
let body = models::PatchSecuritylevelsIdBody {
name: Some("Hauskreis Nord".into()),
..Default::default()
};
let result = client.security_levels().patch(1, &body)?;
println!("{}", result.name);Sourcepub fn patch_with(
&self,
id: impl Display,
query: &PatchSecuritylevelsIdQuery,
body: &PatchSecuritylevelsIdBody,
) -> Result<PatchSecuritylevelsIdResponse>
pub fn patch_with( &self, id: impl Display, query: &PatchSecuritylevelsIdQuery, body: &PatchSecuritylevelsIdBody, ) -> Result<PatchSecuritylevelsIdResponse>
Update the security level
Like Self::patch, with query parameters.
PATCH /securitylevels/{id}
Changes the security level. ID changes must preserve the relative order of all existing security levels. Requires “edit masterdata” in “churchdb”.
Sourcepub fn renumber(&self) -> Result<()>
pub fn renumber(&self) -> Result<()>
Renumber security levels without changing their hierarchy
POST /securitylevels/renumber
Renumbers security levels atomically to create gaps for inserting new levels, preserving their relative order. Updates internal security-level references and permissions. External integrations must refresh stored security-level IDs after this operation. Requires “edit masterdata” in “churchdb”. Returns 403 without changing data if group-member-field thresholds or security-level grants reference unknown levels. Valid sentinel values remain unchanged, including grants stored as -1 for unrestricted access.
§Example
client.security_levels().renumber()?;