fabaccess-bffh/bffhd/capnp/permissionsystem.rs
Nadja von Reitzenstein Čerpnjak 5400d7f799 Implement resource API
2024-05-14 11:05:39 +02:00

25 lines
508 B
Rust

use crate::authorization::roles::Role;
use crate::Roles;
use capnp::capability::Promise;
use capnp::Error;
use tracing::Span;
use crate::session::SessionHandle;
const TARGET: &str = "bffh::api::permissionsystem";
pub struct Permissions {
span: Span,
roles: Roles,
}
impl Permissions {
pub fn new(session: SessionHandle) -> Self {
let span = tracing::info_span!(target: TARGET, "PermissionSystem",);
Self {
span,
roles: session.roles,
}
}
}