chore: disable collab ac
This commit is contained in:
parent
1841dc21e2
commit
1b00f4ba86
|
|
@ -113,7 +113,7 @@ async fn init_collab(
|
||||||
|
|
||||||
// Can turn off INFO level into DEBUG. For now, just to see the log
|
// Can turn off INFO level into DEBUG. For now, just to see the log
|
||||||
event!(
|
event!(
|
||||||
tracing::Level::INFO,
|
tracing::Level::DEBUG,
|
||||||
"start decoding:{} state len: {}, sv len: {}, v: {:?}",
|
"start decoding:{} state len: {}, sv len: {}, v: {:?}",
|
||||||
oid,
|
oid,
|
||||||
encoded_collab.doc_state.len(),
|
encoded_collab.doc_state.len(),
|
||||||
|
|
@ -125,7 +125,6 @@ async fn init_collab(
|
||||||
txn.try_apply_update(update)?;
|
txn.try_apply_update(update)?;
|
||||||
drop(txn);
|
drop(txn);
|
||||||
|
|
||||||
event!(tracing::Level::INFO, "finish decoding:{}: doc state", oid,);
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::biz::casbin::access_control::{AccessControl, Action};
|
use crate::biz::casbin::access_control::AccessControl;
|
||||||
use crate::biz::casbin::access_control::{ActionType, ObjectType};
|
use crate::biz::casbin::access_control::{ActionType, ObjectType};
|
||||||
use actix_http::Method;
|
use actix_http::Method;
|
||||||
use app_error::AppError;
|
use app_error::AppError;
|
||||||
|
|
@ -69,30 +69,31 @@ impl CollabAccessControl for CollabAccessControlImpl {
|
||||||
|
|
||||||
async fn can_access_http_method(
|
async fn can_access_http_method(
|
||||||
&self,
|
&self,
|
||||||
uid: &i64,
|
_uid: &i64,
|
||||||
oid: &str,
|
_oid: &str,
|
||||||
method: &Method,
|
_method: &Method,
|
||||||
) -> Result<bool, AppError> {
|
) -> Result<bool, AppError> {
|
||||||
let action = Action::from(method);
|
Ok(true)
|
||||||
self
|
// let action = Action::from(method);
|
||||||
.access_control
|
// self
|
||||||
.enforce(uid, &ObjectType::Collab(oid), action)
|
// .access_control
|
||||||
.await
|
// .enforce(uid, &ObjectType::Collab(oid), action)
|
||||||
|
// .await
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn can_send_collab_update(&self, uid: &i64, oid: &str) -> Result<bool, AppError> {
|
async fn can_send_collab_update(&self, _uid: &i64, _oid: &str) -> Result<bool, AppError> {
|
||||||
// Ok(true)
|
Ok(true)
|
||||||
self
|
// self
|
||||||
.access_control
|
// .access_control
|
||||||
.enforce(uid, &ObjectType::Collab(oid), Action::Write)
|
// .enforce(uid, &ObjectType::Collab(oid), Action::Write)
|
||||||
.await
|
// .await
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn can_receive_collab_update(&self, uid: &i64, oid: &str) -> Result<bool, AppError> {
|
async fn can_receive_collab_update(&self, _uid: &i64, _oid: &str) -> Result<bool, AppError> {
|
||||||
// Ok(true)
|
Ok(true)
|
||||||
self
|
// self
|
||||||
.access_control
|
// .access_control
|
||||||
.enforce(uid, &ObjectType::Collab(oid), Action::Read)
|
// .enforce(uid, &ObjectType::Collab(oid), Action::Read)
|
||||||
.await
|
// .await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue