Skip to content

Basic user scoped feature flags #3120

@rtibbles

Description

@rtibbles

Desired behavior

Add the ability to toggle on or off basic feature flags for users, this will allow new features to be gated in release.
Can draw inspiration from the similar addition of functionality in https://github.com/learningequality/kolibri-data-portal/pull/187 but on a per user basis.

TODOs:

  • Add 'feature_flags' JSONField to the User model
  • Ensure that 'feature_flags' is serialized into the template when user data is loaded
  • Add a frontend getter to the vuex session model for 'check feature flag' - this should always return true for admins, otherwise should check if the flag is set for the user
  • Add ability to edit the feature flags in the admin interface user detail panel:
    • Hard code list of current feature flags
    • Add checkbox per flag
    • Add under setting disk space section, to allow reuse of Save Changes button already present

Value add

This will allow us to more aggressively add new functionality to Studio, while limiting impact.

Possible tradeoffs

We might end up with an explosion of feature flags, which would make the JSON unwieldy. We might need to add a management command in the future to purge unused flags.

Metadata

Metadata

Assignees

Labels

P0 - criticalPriority: Release blocker or regression

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions