I should really read my own documentation sometimes.

This commit is contained in:
Nadja Reitzenstein 2023-01-11 14:50:48 +01:00
parent e42a32934a
commit 946a08c19c
2 changed files with 11 additions and 7 deletions

View File

@ -61,12 +61,14 @@ impl SessionCallback for Callback {
let authcid = context
.get_ref::<AuthId>()
.ok_or(ValidationError::MissingRequiredProperty)?;
let authzid = context.get_ref::<AuthzId>();
let authzid = context
.get_ref::<AuthzId>()
.ok_or(ValidationError::MissingRequiredProperty)?;
let password = context
.get_ref::<Password>()
.ok_or(ValidationError::MissingRequiredProperty)?;
if authzid.is_some() {
if !authzid.is_empty() {
return Ok(());
}

View File

@ -1,6 +1,7 @@
use crate::authorization::permissions::Permission;
use crate::session::SessionHandle;
use crate::users::{db, UserRef};
use crate::CONFIG;
use api::general_capnp::optional;
use api::user_capnp::user::card_d_e_s_fire_e_v2::{
BindParams, BindResults, GenCardTokenParams, GenCardTokenResults, GetMetaInfoParams,
@ -14,7 +15,6 @@ use capnp_rpc::pry;
use std::borrow::Cow;
use std::io::Write;
use uuid::Uuid;
use crate::CONFIG;
const TARGET: &str = "bffh::api::user";
@ -347,9 +347,11 @@ impl card_d_e_s_fire_e_v2::Server for User {
Promise::ok(())
}
fn get_meta_info(&mut self, _: GetMetaInfoParams, mut results: GetMetaInfoResults)
-> Promise<(), Error>
{
fn get_meta_info(
&mut self,
_: GetMetaInfoParams,
mut results: GetMetaInfoResults,
) -> Promise<(), Error> {
let _guard = self.span.enter();
let _span = tracing::trace_span!(target: TARGET, "get_meta_info").entered();
tracing::trace!("method call");