Skip to content

Commit 6dbd1e5

Browse files
fix(labrinth): make orgs with a single user and only approved projects visible to non-logged-in people (#4557)
I made a typo on PR #4426 by making the corresponding SQL query filter by projects with an unexisting `public` status, instead of `approved`. During my testing, I used the `archived` status, so I didn't notice it back then.
1 parent 77afdb1 commit 6dbd1e5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/labrinth/src/auth/checks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ pub async fn is_visible_organization(
377377
// This is meant to match the same projects as the `Project::is_searchable` method, but we're not using
378378
// it here because that'd entail pulling in all projects for the organization
379379
let has_searchable_projects = sqlx::query_scalar!(
380-
"SELECT TRUE FROM mods WHERE organization_id = $1 AND status IN ('public', 'archived') LIMIT 1",
380+
"SELECT TRUE FROM mods WHERE organization_id = $1 AND status IN ('approved', 'archived') LIMIT 1",
381381
organization.id as database::models::ids::DBOrganizationId
382382
)
383383
.fetch_optional(pool)

0 commit comments

Comments
 (0)