Merge pull request #13188 from JMAConsulting/core-563
[civicrm-core.git] / CRM / Activity / Form / ActivityLinks.php
index ee26e848c513e25e5300cdc4b47e3095179e0f3d..665d55df0c7aaaa0ebbdaf9c4a63b079322f25be 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
+ | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
@@ -73,7 +73,7 @@ class CRM_Activity_Form_ActivityLinks extends CRM_Core_Form {
         }
       }
       elseif ($act['name'] == 'SMS') {
-        if (!$contactId || !CRM_SMS_BAO_Provider::activeProviderCount()) {
+        if (!$contactId || !CRM_SMS_BAO_Provider::activeProviderCount() || !CRM_Core_Permission::check('send SMS')) {
           continue;
         }
         // Check for existence of a mobile phone and ! do not SMS privacy setting