fix: also join object for self auth check
This commit is contained in:
parent
0fba4d6838
commit
9ae00a4a0c
2 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,7 @@ pub async fn page(
|
||||||
])
|
])
|
||||||
.join(sea_orm::JoinType::InnerJoin, upub::model::like::Relation::Activities.def())
|
.join(sea_orm::JoinType::InnerJoin, upub::model::like::Relation::Activities.def())
|
||||||
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.def())
|
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.def())
|
||||||
|
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Objects.def())
|
||||||
.filter(auth.filter_activities())
|
.filter(auth.filter_activities())
|
||||||
.filter(upub::model::like::Column::Object.eq(internal))
|
.filter(upub::model::like::Column::Object.eq(internal))
|
||||||
.order_by_desc(upub::model::like::Column::Published)
|
.order_by_desc(upub::model::like::Column::Published)
|
||||||
|
|
|
@ -45,6 +45,7 @@ pub async fn page(
|
||||||
])
|
])
|
||||||
.join(sea_orm::JoinType::InnerJoin, upub::model::announce::Relation::Activities.def())
|
.join(sea_orm::JoinType::InnerJoin, upub::model::announce::Relation::Activities.def())
|
||||||
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.def())
|
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Addressing.def())
|
||||||
|
.join(sea_orm::JoinType::InnerJoin, upub::model::activity::Relation::Objects.def())
|
||||||
.filter(auth.filter_activities())
|
.filter(auth.filter_activities())
|
||||||
.filter(upub::model::announce::Column::Object.eq(internal))
|
.filter(upub::model::announce::Column::Object.eq(internal))
|
||||||
.order_by_desc(upub::model::announce::Column::Published)
|
.order_by_desc(upub::model::announce::Column::Published)
|
||||||
|
|
Loading…
Reference in a new issue