Skip to content

Commit

Permalink
apply cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cpprian committed Aug 13, 2024
1 parent 5db84c4 commit c83c51b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/db/models/enrollment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,10 @@ impl User {
);
debug!("Check if {} has a password.", self.username);
if self.has_password() {
debug!("User {} that you want to start enrollment process for already has a password.", self.username);
debug!(
"User {} that you want to start enrollment process for already has a password.",
self.username
);
return Err(TokenError::AlreadyActive);
}

Expand Down Expand Up @@ -497,7 +500,10 @@ impl User {
send_user_notification: bool,
mail_tx: UnboundedSender<Mail>,
) -> Result<String, TokenError> {
info!("User {} starting a new desktop activation for user {}", admin.username, self.username);
info!(
"User {} starting a new desktop activation for user {}",
admin.username, self.username
);
debug!(
"Notify {} by mail about the enrollment process: {}",
self.username, send_user_notification
Expand Down
4 changes: 3 additions & 1 deletion src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ pub async fn user_for_admin_or_self(
}
}
} else {
debug!("User from the current session doesn't have enough privileges to do this operation.");
debug!(
"User from the current session doesn't have enough privileges to do this operation."
);
Err(WebError::Forbidden("requires privileged access".into()))
}
}
Expand Down

0 comments on commit c83c51b

Please sign in to comment.