From 439a9f1b58c6906ec4191e359d924a2fad440792 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 9 Mar 2014 17:22:23 -0700 Subject: [PATCH] CRM-14210 - Add hidden option to disable security alerts --- CRM/Utils/Check/Security.php | 4 +++- settings/Core.setting.php | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/Check/Security.php b/CRM/Utils/Check/Security.php index f22be1535c..3e2b6716a0 100644 --- a/CRM/Utils/Check/Security.php +++ b/CRM/Utils/Check/Security.php @@ -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)) { diff --git a/settings/Core.setting.php b/settings/Core.setting.php index 596f996836..8ac37c239a 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -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', -- 2.25.1