fabaccess-bffh/bffhd/session/mod.rs

51 lines
1007 B
Rust
Raw Normal View History

2022-03-12 17:31:53 +01:00
use std::sync::Arc;
2022-03-13 17:29:21 +01:00
use crate::authorization::roles::Role;
use crate::resources::Resource;
use crate::users::User;
2022-03-12 17:31:53 +01:00
struct Inner {
}
impl Inner {
pub fn new() -> Self {
Self { }
}
}
#[derive(Clone)]
pub struct SessionManager {
inner: Arc<Inner>,
}
impl SessionManager {
pub fn new() -> Self {
Self {
inner: Arc::new(Inner::new()),
}
}
pub fn open(&self, uid: impl AsRef<str>) -> Option<SessionHandle> {
unimplemented!()
}
}
#[derive(Clone, Debug)]
pub struct SessionHandle {
}
impl SessionHandle {
2022-03-13 17:29:21 +01:00
pub fn get_user(&self) -> User {
unimplemented!()
}
pub fn has_disclose(&self, resource: &Resource) -> bool {
unimplemented!()
}
pub fn has_read(&self, resource: &Resource) -> bool {
unimplemented!()
}
pub fn has_write(&self, resource: &Resource) -> bool {
unimplemented!()
}
pub fn has_manage(&self, resource: &Resource) -> bool {
unimplemented!()
}
2022-03-12 17:31:53 +01:00
}