This commit is contained in:
Gregor Reitzenstein 2020-11-17 14:38:11 +01:00
parent 5f75dd0925
commit 5d9c1d5a64
2 changed files with 3 additions and 6 deletions

View File

@ -1,6 +1,6 @@
use std::sync::Arc; use std::sync::Arc;
use capnp::capability::{Params, Results, Promise, FromServer}; use capnp::capability::{Params, Results, Promise};
use crate::schema::connection_capnp; use crate::schema::connection_capnp;
use crate::connection::Session; use crate::connection::Session;
@ -39,11 +39,8 @@ impl connection_capnp::bootstrap::Server for Bootstrap {
fn permissions(&mut self, fn permissions(&mut self,
_: Params<permissions_params::Owned>, _: Params<permissions_params::Owned>,
mut res: Results<permissions_results::Owned> _: Results<permissions_results::Owned>
) -> Promise<(), capnp::Error> { ) -> Promise<(), capnp::Error> {
if self.session.user.is_some() {
}
Promise::ok(()) Promise::ok(())
} }

View File

@ -54,7 +54,7 @@ async fn handshake(log: &Logger, stream: &mut TcpStream) -> Result<()> {
} }
} }
pub async fn handle_connection(log: Logger, mut stream: TcpStream) -> Result<()> { pub async fn handle_connection(log: Logger, stream: TcpStream) -> Result<()> {
//handshake(&log, &mut stream).await?; //handshake(&log, &mut stream).await?;
let session = Arc::new(Session::new(log)); let session = Arc::new(Session::new(log));