Users can view their own posts after removal (fixes #4186) (#4192)

This commit is contained in:
Nutomic 2023-11-23 15:47:49 +01:00 committed by GitHub
parent cafeb14f1c
commit 26297b4035
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -274,8 +274,16 @@ fn queries<'a>() -> Queries<
// Hide deleted and removed for non-admins or mods // Hide deleted and removed for non-admins or mods
if !is_mod_or_admin { if !is_mod_or_admin {
query = query query = query
.filter(community::removed.eq(false)) .filter(
.filter(post::removed.eq(false)) community::removed
.eq(false)
.or(post::creator_id.eq(person_id_join)),
)
.filter(
post::removed
.eq(false)
.or(post::creator_id.eq(person_id_join)),
)
// users can see their own deleted posts // users can see their own deleted posts
.filter( .filter(
community::deleted community::deleted

@ -1 +1 @@
Subproject commit a36865ee8ca3658fea31ba948b67b75a812e84fc Subproject commit 277e3c335bbb9c00c4a600bd4d655b273393f84a