CRM-15176
authorJitendra Purohit <jitendra.purohit@webaccessglobal.com>
Tue, 26 Aug 2014 11:00:38 +0000 (16:30 +0530)
committerJitendra Purohit <jitendra.purohit@webaccessglobal.com>
Tue, 26 Aug 2014 11:00:38 +0000 (16:30 +0530)
CRM/Admin/Form/Tag.php
CRM/Group/Form/Edit.php

index 5346a4d6c920924f2386c19237bd35e9f4fd7f6b..ccf752700c8f69010f6262be591aaef0f58ca6e8 100644 (file)
@@ -54,6 +54,9 @@ class CRM_Admin_Form_Tag extends CRM_Admin_Form {
         $url = CRM_Utils_System::url('civicrm/admin/tag', "reset=1");
         CRM_Core_Error::statusBounce(ts("This tag cannot be deleted. You must delete all its child tags ('%1', etc) prior to deleting this tag.", array(1 => $tag)), $url);
       }
+      if ($this->_values['is_reserved'] == 1 && !CRM_Core_Permission::check('administer reserved tags')) {
+        CRM_Core_Error::statusBounce(ts("You do not have sufficient permission to delete this reserved tag."));
+      }
     }
     else {
       $this->_isTagSet = CRM_Utils_Request::retrieve('tagset', 'Positive', $this);
index a7f1cf8ef23f591ae8f63ec45d5015ec915452bf..031ca8b7444b4e3f671ae0485852610759b169b5 100644 (file)
@@ -111,8 +111,14 @@ class CRM_Group_Form_Edit extends CRM_Core_Form {
         $this->assign('count', CRM_Contact_BAO_Group::memberCount($this->_id));
         CRM_Utils_System::setTitle(ts('Confirm Group Delete'));
       }
+      if ($this->_groupValues['is_reserved'] == 1 && !CRM_Core_Permission::check('administer reserved groups')) {
+        CRM_Core_Error::statusBounce(ts("You do not have sufficient permission to delete this reserved group."));
+      }
     }
     else {
+      if ($this->_groupValues['is_reserved'] == 1 && !CRM_Core_Permission::check('administer reserved groups')) {
+        CRM_Core_Error::statusBounce(ts("You do not have sufficient permission to change settings for this reserved group."));
+      }
       if (isset($this->_id)) {
         $groupValues = array(
           'id' => $this->_id,