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

View File

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