CRM-19950 : Wrong param passed to checkPermission function
authoryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 9 Feb 2017 04:03:15 +0000 (09:33 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 16 Mar 2017 04:15:24 +0000 (09:45 +0530)
CRM/Contact/BAO/Group.php
CRM/Core/BAO/UFGroup.php

index caf8147ae9d9bba62d669fb7c184697ccd87ad87..54fd20a9886cbca313e98843b6966bc9babb7413 100644 (file)
@@ -870,7 +870,7 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group {
     $visibility = CRM_Core_SelectValues::ufVisibility();
 
     while ($object->fetch()) {
-      $permission = CRM_Contact_BAO_Group::checkPermission($object->id, $object->title);
+      $permission = CRM_Contact_BAO_Group::checkPermission($object->id, TRUE);
       //@todo CRM-12209 introduced an ACL check in the whereClause function
       // it may be that this checking is now obsolete - or that what remains
       // should be removed to the whereClause (which is also accessed by getCount)
index d4b6a4eda099fb8c52e3c5650c38638ae7d058a8..875e2cabbb312d2503742dc26511bf09e47f243e 100644 (file)
@@ -1059,7 +1059,7 @@ class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
           foreach ($groups as $g) {
             // CRM-8362: User and User Admin visibility groups should be included in display if user has
             // VIEW permission on that group
-            $groupPerm = CRM_Contact_BAO_Group::checkPermission($g['group_id'], $g['title']);
+            $groupPerm = CRM_Contact_BAO_Group::checkPermission($g['group_id'], TRUE);
 
             if ($g['visibility'] != 'User and User Admin Only' ||
               CRM_Utils_Array::key(CRM_Core_Permission::VIEW, $groupPerm)