Get feature flags from django-waffle in Accounts#1738
Draft
davinotdavid wants to merge 4 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
/auth/waffle-flagsendpoint that makes a request to Accounts to retrieve the feature flags.PostLoginViewcomponent), we are making the call to the waffle flags and storing just the flags in the user store.Why?
Now that we are exposing the django-waffle feature flags from Accounts, we should be able to make them readily available to be used.
How to test
Prerequisite:
thunderbird-accountsusing this PR andappointmenttogether so that the flags set in Accounts can be shown here.[thunderbird-accounts]
admin@example.org/adminand navigate to http://localhost:8087/admin/waffle/flag/ and add an arbitrary flag there.[appointment]
admin@example.org/admin/auth/waffle-flagscall in the Network tab and check the Pinia store in the VueJS DevTools in the user store to check that thefeatureFlagskey is populated correctly.Limitations and Notes
When we are using non-authenticated requests, we are not able to feature flag per user (of course). This is a problem for the Google Calendar Invites (currently
GOOGLE_INVITE_ENABLEDenv var) as this feature flag is required in the unauthenticated booking endpoints, unfortunately.Applicable Issues
Closes #1737
Related with thunderbird/thunderbird-accounts#1072
Screenshots