chore: disable collab ac

This commit is contained in:
nathan 2024-02-20 10:54:32 +08:00
parent 2992f44e44
commit 558fafc589
2 changed files with 13 additions and 14 deletions

View File

@ -73,7 +73,6 @@ impl CollabAccessControl for CollabAccessControlImpl {
oid: &str, oid: &str,
method: &Method, method: &Method,
) -> Result<bool, AppError> { ) -> Result<bool, AppError> {
// Ok(true)
let action = Action::from(method); let action = Action::from(method);
self self
.access_control .access_control
@ -81,19 +80,19 @@ impl CollabAccessControl for CollabAccessControlImpl {
.await .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
} }
} }

View File

@ -240,7 +240,7 @@ where
Some(encoded_collab) => { Some(encoded_collab) => {
event!( event!(
tracing::Level::DEBUG, tracing::Level::DEBUG,
"Get encoded collab:{} from redis", "Get encoded collab:{} from cache",
params.object_id params.object_id
); );
Ok(encoded_collab) Ok(encoded_collab)