Cleaned up events
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 9m7s
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 9m7s
This commit is contained in:
@@ -39,7 +39,7 @@ impl Reconcile for Group {
|
||||
|
||||
lldap_client.create_group(&name).await?;
|
||||
|
||||
ctx.recorder.group_created(self.as_ref(), &name).await?;
|
||||
ctx.recorder.group_created(self.as_ref()).await?;
|
||||
} else {
|
||||
trace!("Group already exists");
|
||||
}
|
||||
@@ -66,7 +66,7 @@ impl Reconcile for Group {
|
||||
|
||||
lldap_client.delete_group(group.id).await?;
|
||||
|
||||
ctx.recorder.group_deleted(self.as_ref(), &name).await?;
|
||||
ctx.recorder.group_deleted(self.as_ref()).await?;
|
||||
} else {
|
||||
trace!(name, "Group does not exist")
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ impl Reconcile for ServiceUser {
|
||||
debug!(name, username, "Creating new user");
|
||||
|
||||
let user = lldap_client.create_user(&username).await?;
|
||||
ctx.recorder.user_created(self.as_ref(), &username).await?;
|
||||
ctx.recorder.user_created(self.as_ref()).await?;
|
||||
|
||||
Ok(user)
|
||||
}
|
||||
@@ -208,14 +208,11 @@ impl Reconcile for ServiceUser {
|
||||
Err(lldap::Error::GraphQl(err))
|
||||
if err.message == format!("Entity not found: `No such user: '{username}'`") =>
|
||||
{
|
||||
ctx.recorder
|
||||
.user_not_found(self.as_ref(), &username)
|
||||
.await?;
|
||||
warn!(name, username, "User not found");
|
||||
Ok(())
|
||||
}
|
||||
Ok(_) => {
|
||||
ctx.recorder.user_deleted(self.as_ref(), &username).await?;
|
||||
ctx.recorder.user_deleted(self.as_ref()).await?;
|
||||
Ok(())
|
||||
}
|
||||
Err(err) => Err(err),
|
||||
|
||||
@@ -11,11 +11,7 @@ use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
use tracing::{debug, trace, warn};
|
||||
|
||||
use crate::{
|
||||
context::ControllerEvents,
|
||||
lldap,
|
||||
resources::{Error, user_attribute},
|
||||
};
|
||||
use crate::{context::ControllerEvents, lldap, resources::Error};
|
||||
|
||||
use super::Reconcile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user