Browse Source

Maintenance: Drop unused setting and improved wording in other settings.

Martin Gruner 2 years ago
parent
commit
99aa58bbf9

+ 36 - 0
db/migrate/20220504133218_setting_updates3.rb

@@ -0,0 +1,36 @@
+# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
+
+class SettingUpdates3 < ActiveRecord::Migration[6.1]
+  def change
+    return if !Setting.exists?(name: 'system_init_done')
+
+    settings_update = [
+      {
+        name:        'idoit_integration',
+        description: 'Defines if the i-doit (https://www.i-doit.org/) integration is enabled or not.',
+      },
+      {
+        title:       'Microsoft 365 App Credentials',
+        name:        'auth_microsoft_office365_credentials',
+        description: 'Enables user authentication via Microsoft 365.',
+      },
+    ]
+
+    settings_update.each do |setting|
+      fetched_setting = Setting.find_by(name: setting[:name])
+      next if !fetched_setting
+
+      if setting[:title]
+        # "Updating title of #{setting[:name]} to #{setting[:title]}"
+        fetched_setting.title = setting[:title]
+      end
+
+      if setting[:description]
+        # "Updating description of #{setting[:name]} to #{setting[:description]}"
+        fetched_setting.description = setting[:description]
+      end
+
+      fetched_setting.save!
+    end
+  end
+end

+ 9 - 0
db/migrate/20220504134218_drop_setting_ui_client_storage.rb

@@ -0,0 +1,9 @@
+# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
+
+class DropSettingUiClientStorage < ActiveRecord::Migration[6.1]
+  def change
+    return if !Setting.exists?(name: 'system_init_done')
+
+    Setting.find_by(name: 'ui_client_storage')&.destroy
+  end
+end

+ 3 - 29
db/seeds/settings.rb

@@ -596,32 +596,6 @@ Setting.create_if_not_exists(
   },
   frontend:    true
 )
-Setting.create_if_not_exists(
-  title:       __('Client storage'),
-  name:        'ui_client_storage',
-  area:        'System::UI',
-  description: __('Use client storage to cache data to enhance performance of application.'),
-  options:     {
-    form: [
-      {
-        display: '',
-        null:    true,
-        name:    'ui_client_storage',
-        tag:     'boolean',
-        options: {
-          true  => 'yes',
-          false => 'no',
-        },
-      },
-    ],
-  },
-  state:       false,
-  preferences: {
-    prio:       2,
-    permission: ['admin.system'],
-  },
-  frontend:    true
-)
 Setting.create_if_not_exists(
   title:       __('Core Workflow Ajax Mode'),
   name:        'core_workflow_ajax_mode',
@@ -1687,10 +1661,10 @@ Setting.create_if_not_exists(
   frontend:    true
 )
 Setting.create_if_not_exists(
-  title:       __('Office 365 App Credentials'),
+  title:       __('Microsoft 365 App Credentials'),
   name:        'auth_microsoft_office365_credentials',
   area:        'Security::ThirdPartyAuthentication::Office365',
-  description: __('Enables user authentication via Office 365.'),
+  description: __('Enables user authentication via Microsoft 365.'),
   options:     {
     form: [
       {
@@ -4290,7 +4264,7 @@ Setting.create_if_not_exists(
   title:       __('i-doit integration'),
   name:        'idoit_integration',
   area:        'Integration::Switch',
-  description: __('Defines if i-doit (http://www.i-doit) is enabled or not.'),
+  description: __('Defines if the i-doit (https://www.i-doit.org/) integration is enabled or not.'),
   options:     {
     form: [
       {

+ 9 - 17
i18n/zammad.pot

@@ -1740,10 +1740,6 @@ msgstr ""
 msgid "Client Secret"
 msgstr ""
 
-#: db/seeds/settings.rb
-msgid "Client storage"
-msgstr ""
-
 #: app/assets/javascripts/app/models/application.coffee
 msgid "Clients"
 msgstr ""
@@ -2688,10 +2684,6 @@ msgstr ""
 msgid "Defines if generic CTI integration is enabled or not."
 msgstr ""
 
-#: db/seeds/settings.rb
-msgid "Defines if i-doit (http://www.i-doit) is enabled or not."
-msgstr ""
-
 #: db/seeds/settings.rb
 msgid "Defines if sipgate.io (http://www.sipgate.io) is enabled or not."
 msgstr ""
@@ -2720,6 +2712,10 @@ msgstr ""
 msgid "Defines if the email should be displayed in the result of the user/organization widget."
 msgstr ""
 
+#: db/seeds/settings.rb
+msgid "Defines if the i-doit (https://www.i-doit.org/) integration is enabled or not."
+msgstr ""
+
 #: db/seeds/settings.rb
 msgid "Defines if tickets can be created via web form."
 msgstr ""
@@ -3688,7 +3684,7 @@ msgid "Enables user authentication via LinkedIn."
 msgstr ""
 
 #: db/seeds/settings.rb
-msgid "Enables user authentication via Office 365."
+msgid "Enables user authentication via Microsoft 365."
 msgstr ""
 
 #: db/seeds/settings.rb
@@ -5809,6 +5805,10 @@ msgstr ""
 msgid "Microsoft 365"
 msgstr ""
 
+#: db/seeds/settings.rb
+msgid "Microsoft 365 App Credentials"
+msgstr ""
+
 #: db/seeds/settings.rb
 msgid "Microsoft Application Registration Portal"
 msgstr ""
@@ -6620,10 +6620,6 @@ msgstr ""
 msgid "October"
 msgstr ""
 
-#: db/seeds/settings.rb
-msgid "Office 365 App Credentials"
-msgstr ""
-
 #: app/assets/javascripts/app/controllers/knowledge_base/delete_action.coffee
 msgid "Ok"
 msgstr ""
@@ -9841,10 +9837,6 @@ msgstr ""
 msgid "Usage of advanced features"
 msgstr ""
 
-#: db/seeds/settings.rb
-msgid "Use client storage to cache data to enhance performance of application."
-msgstr ""
-
 #: app/assets/javascripts/app/views/object_manager/attribute/multiselect.jst.eco
 #: app/assets/javascripts/app/views/object_manager/attribute/select.jst.eco
 msgid "Use custom option sort"