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
|
||||
event!(
|
||||
tracing::Level::INFO,
|
||||
tracing::Level::DEBUG,
|
||||
"start decoding:{} state len: {}, sv len: {}, v: {:?}",
|
||||
oid,
|
||||
encoded_collab.doc_state.len(),
|
||||
|
|
@ -125,7 +125,6 @@ async fn init_collab(
|
|||
txn.try_apply_update(update)?;
|
||||
drop(txn);
|
||||
|
||||
event!(tracing::Level::INFO, "finish decoding:{}: doc state", oid,);
|
||||
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 actix_http::Method;
|
||||
use app_error::AppError;
|
||||
|
|
@ -69,30 +69,31 @@ impl CollabAccessControl for CollabAccessControlImpl {
|
|||
|
||||
async fn can_access_http_method(
|
||||
&self,
|
||||
uid: &i64,
|
||||
oid: &str,
|
||||
method: &Method,
|
||||
_uid: &i64,
|
||||
_oid: &str,
|
||||
_method: &Method,
|
||||
) -> Result<bool, AppError> {
|
||||
let action = Action::from(method);
|
||||
self
|
||||
.access_control
|
||||
.enforce(uid, &ObjectType::Collab(oid), action)
|
||||
.await
|
||||
Ok(true)
|
||||
// let action = Action::from(method);
|
||||
// self
|
||||
// .access_control
|
||||
// .enforce(uid, &ObjectType::Collab(oid), action)
|
||||
// .await
|
||||
}
|
||||
|
||||
async fn can_send_collab_update(&self, uid: &i64, oid: &str) -> Result<bool, AppError> {
|
||||
// Ok(true)
|
||||
self
|
||||
.access_control
|
||||
.enforce(uid, &ObjectType::Collab(oid), Action::Write)
|
||||
.await
|
||||
async fn can_send_collab_update(&self, _uid: &i64, _oid: &str) -> Result<bool, AppError> {
|
||||
Ok(true)
|
||||
// self
|
||||
// .access_control
|
||||
// .enforce(uid, &ObjectType::Collab(oid), Action::Write)
|
||||
// .await
|
||||
}
|
||||
|
||||
async fn can_receive_collab_update(&self, uid: &i64, oid: &str) -> Result<bool, AppError> {
|
||||
// Ok(true)
|
||||
self
|
||||
.access_control
|
||||
.enforce(uid, &ObjectType::Collab(oid), Action::Read)
|
||||
.await
|
||||
async fn can_receive_collab_update(&self, _uid: &i64, _oid: &str) -> Result<bool, AppError> {
|
||||
Ok(true)
|
||||
// self
|
||||
// .access_control
|
||||
// .enforce(uid, &ObjectType::Collab(oid), Action::Read)
|
||||
// .await
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue