mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 06:47:56 +01:00
I should really read my own documentation sometimes.
This commit is contained in:
parent
e42a32934a
commit
946a08c19c
@ -61,12 +61,14 @@ impl SessionCallback for Callback {
|
|||||||
let authcid = context
|
let authcid = context
|
||||||
.get_ref::<AuthId>()
|
.get_ref::<AuthId>()
|
||||||
.ok_or(ValidationError::MissingRequiredProperty)?;
|
.ok_or(ValidationError::MissingRequiredProperty)?;
|
||||||
let authzid = context.get_ref::<AuthzId>();
|
let authzid = context
|
||||||
|
.get_ref::<AuthzId>()
|
||||||
|
.ok_or(ValidationError::MissingRequiredProperty)?;
|
||||||
let password = context
|
let password = context
|
||||||
.get_ref::<Password>()
|
.get_ref::<Password>()
|
||||||
.ok_or(ValidationError::MissingRequiredProperty)?;
|
.ok_or(ValidationError::MissingRequiredProperty)?;
|
||||||
|
|
||||||
if authzid.is_some() {
|
if !authzid.is_empty() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use crate::authorization::permissions::Permission;
|
use crate::authorization::permissions::Permission;
|
||||||
use crate::session::SessionHandle;
|
use crate::session::SessionHandle;
|
||||||
use crate::users::{db, UserRef};
|
use crate::users::{db, UserRef};
|
||||||
|
use crate::CONFIG;
|
||||||
use api::general_capnp::optional;
|
use api::general_capnp::optional;
|
||||||
use api::user_capnp::user::card_d_e_s_fire_e_v2::{
|
use api::user_capnp::user::card_d_e_s_fire_e_v2::{
|
||||||
BindParams, BindResults, GenCardTokenParams, GenCardTokenResults, GetMetaInfoParams,
|
BindParams, BindResults, GenCardTokenParams, GenCardTokenResults, GetMetaInfoParams,
|
||||||
@ -14,7 +15,6 @@ use capnp_rpc::pry;
|
|||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
use crate::CONFIG;
|
|
||||||
|
|
||||||
const TARGET: &str = "bffh::api::user";
|
const TARGET: &str = "bffh::api::user";
|
||||||
|
|
||||||
@ -347,9 +347,11 @@ impl card_d_e_s_fire_e_v2::Server for User {
|
|||||||
Promise::ok(())
|
Promise::ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_meta_info(&mut self, _: GetMetaInfoParams, mut results: GetMetaInfoResults)
|
fn get_meta_info(
|
||||||
-> Promise<(), Error>
|
&mut self,
|
||||||
{
|
_: GetMetaInfoParams,
|
||||||
|
mut results: GetMetaInfoResults,
|
||||||
|
) -> Promise<(), Error> {
|
||||||
let _guard = self.span.enter();
|
let _guard = self.span.enter();
|
||||||
let _span = tracing::trace_span!(target: TARGET, "get_meta_info").entered();
|
let _span = tracing::trace_span!(target: TARGET, "get_meta_info").entered();
|
||||||
tracing::trace!("method call");
|
tracing::trace!("method call");
|
||||||
@ -362,7 +364,7 @@ impl card_d_e_s_fire_e_v2::Server for User {
|
|||||||
fn get_space_info(
|
fn get_space_info(
|
||||||
&mut self,
|
&mut self,
|
||||||
_: GetSpaceInfoParams,
|
_: GetSpaceInfoParams,
|
||||||
mut results: GetSpaceInfoResults,
|
mut results: GetSpaceInfoResults,
|
||||||
) -> Promise<(), Error> {
|
) -> Promise<(), Error> {
|
||||||
let _guard = self.span.enter();
|
let _guard = self.span.enter();
|
||||||
let _span = tracing::trace_span!(target: TARGET, "get_space_info").entered();
|
let _span = tracing::trace_span!(target: TARGET, "get_space_info").entered();
|
||||||
|
Loading…
Reference in New Issue
Block a user