- CRM_Core_DAO::executeQuery("
- INSERT INTO civicrm_acl (
- `name`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `is_active`
- )
- VALUES (
- 'view picked', 'civicrm_group', $this->_permissionedGroup , 'Edit', 'civicrm_saved_search', {$this->_permissionedGroup}, 1
- );
- ");
+ if ($isProfile) {
+ CRM_Core_DAO::executeQuery("
+ INSERT INTO civicrm_acl (
+ `name`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `is_active`
+ )
+ VALUES (
+ 'view picked', 'civicrm_acl_role', 55, 'Edit', 'civicrm_uf_group', 0, 1
+ );
+ ");
+ }
+ else {
+ CRM_Core_DAO::executeQuery("
+ INSERT INTO civicrm_acl (
+ `name`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `is_active`
+ )
+ VALUES (
+ 'view picked', 'civicrm_group', $this->_permissionedGroup , 'Edit', 'civicrm_saved_search', {$this->_permissionedGroup}, 1
+ );
+ ");
+
+ CRM_Core_DAO::executeQuery("
+ INSERT INTO civicrm_acl (
+ `name`, `entity_table`, `entity_id`, `operation`, `object_table`, `object_id`, `is_active`
+ )
+ VALUES (
+ 'view picked', 'civicrm_group', $this->_permissionedGroup, 'Edit', 'civicrm_saved_search', {$this->_permissionedDisabledGroup}, 1
+ );
+ ");
+ }