CRM-14210 - Add hidden option to disable security alerts
authorTim Otten <totten@civicrm.org>
Mon, 10 Mar 2014 00:22:23 +0000 (17:22 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 10 Mar 2014 00:22:23 +0000 (17:22 -0700)
CRM/Utils/Check/Security.php
settings/Core.setting.php

index f22be1535c1becded26071b2674488a79cebec56..3e2b6716a0164a8020ab8d0147deb732f3a34c54 100644 (file)
@@ -79,7 +79,9 @@ class CRM_Utils_Check_Security {
    * Execute "checkAll"
    */
   public function showPeriodicAlerts() {
-    if (CRM_Core_Permission::check('administer CiviCRM')) {
+    if (CRM_Core_Permission::check('administer CiviCRM')
+      && CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'securityAlert', NULL, TRUE)
+    ) {
       $session = CRM_Core_Session::singleton();
       if ($session->timer('check_' . __CLASS__, self::CHECK_TIMER)) {
 
index 596f99683689fd411a468e19cb6a5d67d28a5863..8ac37c239a5cbc0e596703a18a2ec0ee41f44b4f 100644 (file)
@@ -368,6 +368,22 @@ return array (
 When enabled, statistics about your CiviCRM installation are reported anonymously to the CiviCRM team to assist in prioritizing ongoing development efforts. The following information is gathered: CiviCRM version, versions of PHP, MySQL and framework (Drupal/Joomla/standalone), and default language. Counts (but no actual data) of the following record types are reported: contacts, activities, cases, relationships, contributions, contribution pages, contribution products, contribution widgets, discounts, price sets, profiles, events, participants, tell-a-friend pages, grants, mailings, memberships, membership blocks, pledges, pledge blocks and active payment processor types.",
     'help_text' => null,
   ),
+  'securityAlert' => array(
+    'group_name' => 'CiviCRM Preferences',
+    'group' => 'core',
+    'name' => 'versionCheck',
+    'prefetch' => 0,
+    'config_only'=> 0,
+    'type' => 'Boolean',
+    'quick_form_type' => 'YesNo',
+    'default' => 1,
+    'add' => '4.4',
+    'title' => 'Security Alerts',
+    'is_domain' => 1,
+    'is_contact' => 0,
+    'description' => "If enabled, CiviCRM will automatically run checks for significant mis-configurations such as ineffective file protections.",
+    'help_text' => null,
+  ),
   'doNotAttachPDFReceipt' => array(
     'group_name' => 'CiviCRM Preferences',
     'group' => 'core',