8000 Fixes the enabled/disabled filter on the private resources page. by ASPCODES · Pull Request #3988 · fosrl/pangolin · GitHub
[go: up one dir, main page]

Skip to content

Fixes the enabled/disabled filter on the private resources page. - #3988

Merged
oschwartz10612 merged 4 commits into
fosrl:devfrom
ASPCODES:fix-private-resource-enabled-filter
Oct 26, 2026
Merged

oschwartz10612 merged 4 commits into
fosrl:devfrom
ASPCODES:fix-private-resource-enabled-filter

Conversation

@ASPCODES
Copy link
Copy Markdown
Contributor

Description

Fix #3935

Fixes the enabled/disabled filter on the private resources page.

The frontend already sends the enabled query parameter, but listAllSiteResourcesByOrgQuerySchema did not include it. Since the schema uses z.strictObject(), requests containing enabled=true or enabled=false were rejected with a 400 Bad Request. The page silently caught the error and displayed "No results found" instead of the filtered resources.

Changes

  • Added an optional enabled query parameter to the Zod schema, transforming "true" and "false" into booleans.
  • Extracted enabled from the parsed query parameters.
  • Added a database query condition to filter private resources by their enabled status.

How to test

  1. Open Settings → Resources → Private.
  2. Select Enabled in the Enabled column filter and verify that only enabled resources are shown.
  3. Select Disabled and verify that only disabled resources are shown.
  4. Clear the filter and verify that the unfiltered results appear as expected.
  5. Check the browser's Network tab to confirm that requests with enabled=true and enabled=false no longer fail with a 400 Bad Request.

AI Disclosure

AI was used to assist with investigating the root cause and preparing the fix. The issue was reproduced manually using the browser's Developer Tools, and the implementation was reviewed and tested by the contributor.

@oschwartz10612
oschwartz10612 force-pushed the fix-private-resource-enabled-filter branch from 9413fc5 to 3c76f42 Compare October 26, 2026 13:40
@oschwartz10612
oschwartz10612 changed the base branch from main to dev October 26, 2026 13:40
@oschwartz10612
Copy link
Copy Markdown
Member

Thanks!

@oschwartz10612
oschwartz10612 merged commit 372c039 into fosrl:dev Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] private resource filter "Enabled" not working

3 participants

0