UI toggle for "Enable Rules" and "Email Whitelist" does not reflect DB state on initial load #208

Closed
opened 2026-04-05 17:02:32 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Kapot on 2/24/2026

Describe the Bug

When applyRules and/or emailWhitelistEnabled are set to 1 directly in the SQLite database, the corresponding toggles in the UI ("Enable Rules" on the Rules tab, "Email Whitelist" on the Authentication tab) render as OFF after a full docker compose restart. The data itself (rules and emails) is visible once the toggle is manually clicked on, confirming the DB values are correct and being read — only the initial toggle state is wrong.

Environment

  • OS Type & Version: Ubuntu 24.04.4 LTS
  • Pangolin Version: EE 1.15.2
  • Gerbil Version: 1.3.0
  • Traefik Version: v3.6

To Reproduce

  1. Create a new resource
  2. Insert rules into resourceRules for that resourceId via sqlite3
  3. Insert emails into resourceWhitelist for that resourceId via sqlite3
  4. Set applyRules = 1 and emailWhitelistEnabled = 1 on the resource via sqlite3
  5. Verify DB values are correct: SELECT resourceId, name, applyRules,
    emailWhitelistEnabled FROM resources WHERE resourceId = X;
  6. Restart Pangolin: docker compose restart
  7. Open the resource in the UI, navigate to the Rules tab — "Enable Rules" toggle
    appears OFF despite applyRules = 1 in DB. Navigate to the Authentication tab —
    "Email Whitelist" toggle appears OFF despite emailWhitelistEnabled = 1 in DB.
  8. Click both toggles ON — rules and emails appear immediately, confirming data
    was present all along.

Expected Behavior

The UI should reflect the actual DB state on load. If applyRules = 1 and emailWhitelistEnabled = 1, the corresponding toggles should render as ON after restart without requiring manual interaction.

*Originally created by @Kapot on 2/24/2026* ### Describe the Bug When `applyRules` and/or `emailWhitelistEnabled` are set to `1` directly in the SQLite database, the corresponding toggles in the UI ("Enable Rules" on the Rules tab, "Email Whitelist" on the Authentication tab) render as OFF after a full `docker compose restart`. The data itself (rules and emails) is visible once the toggle is manually clicked on, confirming the DB values are correct and being read — only the initial toggle state is wrong. ### Environment - OS Type & Version: Ubuntu 24.04.4 LTS - Pangolin Version: EE 1.15.2 - Gerbil Version: 1.3.0 - Traefik Version: v3.6 ### To Reproduce 1. Create a new resource 2. Insert rules into resourceRules for that resourceId via sqlite3 3. Insert emails into resourceWhitelist for that resourceId via sqlite3 4. Set applyRules = 1 and emailWhitelistEnabled = 1 on the resource via sqlite3 5. Verify DB values are correct: SELECT resourceId, name, applyRules, emailWhitelistEnabled FROM resources WHERE resourceId = X; 6. Restart Pangolin: docker compose restart 7. Open the resource in the UI, navigate to the Rules tab — "Enable Rules" toggle appears OFF despite applyRules = 1 in DB. Navigate to the Authentication tab — "Email Whitelist" toggle appears OFF despite emailWhitelistEnabled = 1 in DB. 8. Click both toggles ON — rules and emails appear immediately, confirming data was present all along. ### Expected Behavior The UI should reflect the actual DB state on load. If applyRules = 1 and emailWhitelistEnabled = 1, the corresponding toggles should render as ON after restart without requiring manual interaction.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#208