mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 23:27:57 +01:00
25 lines
508 B
Rust
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,
|
|
}
|
|
}
|
|
}
|