Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.75k stars 1.57k forks source link

Still fetch flags when the user is not logged in. #14744

Closed samwho closed 1 month ago

samwho commented 1 month ago

Description

We weren't fetching flags from PostHog when the user had no login, resulting in public endpoints behaving quite differently (in this case, no SQS, which is required for some newer features).

This PR uses the hashed IP address of the logged our user as their user ID, and it also falls back to getting the current tenant ID if the one on the identity cannot be fetched.

Feature branch env

Feature Branch Link

qa-wolf[bot] commented 1 month ago

QA Wolf here! As you write new code it's important that your test coverage is keeping up. Click here to request test coverage for this PR!

samwho commented 1 month ago

I've rejigged the way we fetch IP address and removed the code that reads flags from the license (this was unused anyway, should have no impact on anything). PTAL!