Only list local banned users (fixes #2961) (#5364)

This commit is contained in:
Nutomic 2025-01-28 19:10:57 +00:00 committed by GitHub
parent 8e19d55295
commit f4eb8877a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -91,10 +91,12 @@ fn queries<'a>(
ListMode::Banned => {
query = query
.filter(
person::banned.eq(true).and(
person::ban_expires
.is_null()
.or(person::ban_expires.gt(now().nullable())),
person::local.eq(true).and(
person::banned.eq(true).and(
person::ban_expires
.is_null()
.or(person::ban_expires.gt(now().nullable())),
),
),
)
.filter(person::deleted.eq(false));