Add new instance setting to UI and controller behind feature flag
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
How to set up and validate locally
- In the rails console, enable feature flag:
Feature.enable(:invitation_flow_enforcement_setting)
- Go to the admin panel,
Settings
=>General
=> 'Account and limit`. - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #285586
Edited by Gosia Ksionek