Create feature_flags table and admin UI #34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Follow-up from spike #16 (
docs/auth.md) anddocs/feature-flags.md. Depends on #32 (users + OmniAuth).Repo
ldraney/palinksUser Story
As Lucas
I want a feature flags panel behind a person icon
So that I can toggle features without redeploying
Context
Feature flags are DB-backed with three types: global, role-scoped, per-user. Resolution order: user pref > role override > global default. The person icon in the top-left opens a settings panel. Superadmin sees all flags with toggles. Members see flags available to their role. The
feature_enabled?helper gates code in controllers and views. Seedocs/feature-flags.mdfor the full design.File Targets
db/migrate/xxx_create_feature_flags.rb— feature_flags tableapp/models/feature_flag.rb— new modelapp/helpers/feature_flags_helper.rb—feature_enabled?helperapp/controllers/feature_flags_controller.rb— toggle endpointapp/views/— person icon, settings panel, flag togglesdb/seeds.rb— seed initial flags (e.g.click_tracking)Feature Flag
None — this IS the feature flag system. Cannot flag itself.
Acceptance Criteria
feature_enabled?(:flag_name, current_user)helper worksclick_tracking)Test Expectations
bundle exec rails testConstraints
docs/feature-flags.md(snake_case, no enable_ prefix){"superadmin": true, "member": false}users.preferencesJSONB under"flags"keyChecklist
Related
project-palinks— project pagedocs/feature-flags.md— flag design, resolution order, lifecycle