feat: installation config in super admin console (#1641)

* feat: installation config in super admin console

* Added the ability for super admins to view, edit and update
installation config values. Also they can add new isntallation config
values. The impact of editing and adding depends on which all
installation config values are being used in the code.
* Known limitation now: Ability to edit hash values (for eg: feature
flags) are disabled. This requires more work and will be taken up in
a secondary set of changes.
* Minor UX improvement. Clicking on the Sidekiq option in the super
admin siebar will now open the sidekiq dashboard in a new tab rather
than in the same tab that you were using super admin.

* fix: method name fix in custom adminsitrate field

* feat: added locked attribute to global config
* Added the locked attribute to instalaltion config table. Added
necessary migrations. Added changes in config loader.
* Added the changes on the installation config yml
* Locked the account feature defaults in code

* feat: show only editable configs in admin console
* Added a new scope in installation config model
* Added scope in adminstrate controller for installation_config

* fix: new installation config create error
* Fixed the error in new installation config create

* fix: specs coverage
* Added specs for installation config super admin controller

* chore: update git ignore with encrypted config ext
This commit is contained in:
Sony Mathew
2021-01-15 13:21:53 +05:30
committed by GitHub
parent 2e19de5d01
commit 18d3c40fb3
16 changed files with 296 additions and 30 deletions

View File

@@ -1,26 +1,37 @@
- name: LOGO_THUMBNAIL
value: '/brand-assets/logo_thumbnail.svg'
- name: LOGO
value: '/brand-assets/logo.svg'
# if you dont specify locked attribute, the default value will be true
# which means the particular config will be locked
- name: INSTALLATION_NAME
value: 'Chatwoot'
locked: false
- name: LOGO_THUMBNAIL
value: '/brand-assets/logo_thumbnail.svg'
locked: true
- name: LOGO
value: '/brand-assets/logo.svg'
- name: BRAND_URL
value: 'https://www.chatwoot.com'
- name: WIDGET_BRAND_URL
value: 'https://www.chatwoot.com'
- name: TERMS_URL
value: 'https://www.chatwoot.com/terms-of-service'
- name: PRIVACY_URL
value: 'https://www.chatwoot.com/privacy-policy'
- name: DISPLAY_MANIFEST
value: true
- name: MAILER_INBOUND_EMAIL_DOMAIN
value:
- name: MAILER_SUPPORT_EMAIL
value:
- name: CREATE_NEW_ACCOUNT_FROM_DASHBOARD
value: false
- name: BRAND_NAME
value: 'Chatwoot'
- name: TERMS_URL
value: 'https://www.chatwoot.com/terms-of-service'
locked: false
- name: PRIVACY_URL
value: 'https://www.chatwoot.com/privacy-policy'
locked: false
- name: DISPLAY_MANIFEST
value: true
locked: false
- name: MAILER_INBOUND_EMAIL_DOMAIN
value:
locked: false
- name: MAILER_SUPPORT_EMAIL
value:
locked: false
- name: CREATE_NEW_ACCOUNT_FROM_DASHBOARD
value: false
locked: false
- name: 'INSTALLATION_EVENTS_WEBHOOK_URL'
value:
locked: false

View File

@@ -219,6 +219,7 @@ Rails.application.routes.draw do
resources :users, only: [:index, :new, :create, :show, :edit, :update]
resources :super_admins
resources :access_tokens, only: [:index, :show]
resources :installation_configs, only: [:index, :new, :create, :show, :edit, :update]
# resources that doesn't appear in primary navigation in super admin
resources :account_users, only: [:new, :create, :destroy]