Skip to content

Add new instance setting to UI and controller behind feature flag

Gosia Ksionek requested to merge 285586-invitation-enforcement-setting into master

What does this MR do and why?

In preparation to adding invitation flow for memberships and group sharing, I'm introducing instance-wide setting that is controlling this behaviour. The UI is behind a feature flag as right now this setting is no-op.

migration:

main: == 20220711142148 AddInvitationFlowEnforcementToApplicationSettings: migrating
main: -- add_column(:application_settings, :invitation_flow_enforcement, :boolean, {:default=>false, :null=>false})
main:    -> 0.0066s
main: == 20220711142148 AddInvitationFlowEnforcementToApplicationSettings: migrated (0.0082s)

rollback:

main: == 20220711142148 AddInvitationFlowEnforcementToApplicationSettings: reverting
main: -- remove_column(:application_settings, :invitation_flow_enforcement, :boolean, {:default=>false, :null=>false})
main:    -> 0.0050s
main: == 20220711142148 AddInvitationFlowEnforcementToApplicationSettings: reverted (0.0105s)

Screenshots or screen recordings

image

How to set up and validate locally

  1. In the rails console, enable feature flag: Feature.enable(:invitation_flow_enforcement_setting)
  2. Go to the admin panel, Settings => General => 'Account and limit`.
  3. The new settings is near the end of section.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #285586

Edited by Gosia Ksionek

Merge request reports