diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index d5028b217..8d5f4ec20 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -29,7 +29,8 @@ def update private def account_params - params.require(:account).permit(:name, :cname, :title, *@account.public_settings.keys) + is_superadmin = current_ability.superadmin? + params.require(:account).permit(:name, :cname, :title, *@account.public_settings(is_superadmin: is_superadmin).keys) end def set_current_account diff --git a/app/views/admin/accounts/edit.html.erb b/app/views/admin/accounts/edit.html.erb index 533aa0a07..f759e6190 100644 --- a/app/views/admin/accounts/edit.html.erb +++ b/app/views/admin/accounts/edit.html.erb @@ -1,7 +1,6 @@ <% content_for :page_header do %>