feat: Ability to manage account features from super admin (#5455)

- This PR adds the ability to enable and disable features for an account from the super admin.
This commit is contained in:
Sojan Jose
2022-09-20 03:27:21 +05:30
committed by GitHub
parent 678a0af962
commit 97583e410c
5 changed files with 33 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ class SuperAdmin::AccountsController < SuperAdmin::ApplicationController
def resource_params
permitted_params = super
permitted_params[:limits] = permitted_params[:limits].to_h.compact
permitted_params[:selected_feature_flags] = params[:enabled_features].keys.map(&:to_sym) if params[:enabled_features].present?
permitted_params
end