Per-tenant settings
Descriptive summary
Accounts in Hyku should have a place for a variety of configurable settings beyond fedora, solr, redis, and database settings. This can be done using ActiveRecord's database-independent store / store_accessor which would allow for arbitrary key/value pairs to be added by customized Hyku applications. There should be a UI for tenant admins to configure these settings as well as a UI to configure these from the account edit or manage pages in the superadmin dashboard.
Follow on work would be removing the dependency on rubyconfig and providing an implementation of Settings that checks the account's settings, then ENV variables, then defaults. The Hyrax config would need to be updated on account switch like is being done in #1713.
Related work
https://github.com/samvera/hyku/issues/1685 https://github.com/samvera/hyku/pull/1713
Evolved implementation in hyku_addons:
Account model behavior mixin: https://github.com/ubiquitypress/hyku_addons/blob/main/app/models/concerns/hyku_addons/account_behavior.rb
Superadmin dashboard edit view: https://github.com/ubiquitypress/hyku_addons/blob/main/app/views/proprietor/accounts/edit.html.erb#L54-L70
Tenant dashboard views: https://github.com/ubiquitypress/hyku_addons/tree/main/app/views/hyku_addons/account_settings
Account settings controller: https://github.com/ubiquitypress/hyku_addons/blob/main/app/controllers/hyku_addons/account_settings_controller.rb