CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Report and Search UI Discussion (Moderators: CiviTeacher.com, TwoMice) »
  • Custom Search task is hidden by CiviCore permission checking
Pages: [1]

Author Topic: Custom Search task is hidden by CiviCore permission checking  (Read 723 times)

chanunc

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.10
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.33
  • PHP version: 5.3.27
Custom Search task is hidden by CiviCore permission checking
December 19, 2014, 06:47:32 am
Hi,

   The SimpleMail extension creates custom search task:SimpleMail mass mailing for sending mass mailing in basic search. (We have created the search task from CiviCRM hook: simplemail_civicrm_searchTasks.) The search task is hidden if the CiviCRM permission CiviCRM: edit all contacts is disabled.  We have a particular user group which is prohibited from edit any contacts but they are allowed to send email using SimpleMail mass mailing in search task.

I looked deep down in CiviCRM Core: ../civicrm/CRM/Contact/Task.php
A searchtask hook will be called in initTasks() function and our search task will be created, however it will be took out in &permissionedTaskTitles function according to permission checking.

One solution I can think of is to override CiviCRM Core which I will take this as my last option.
I reckon there might be a better way to fix this or I might miss something out there.

Please if any one can suggest.

Thank you very much

PS: System use Drupal 7.34 + CiviCRM 4.4.10 + SimpleMail ext.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Custom Search task is hidden by CiviCore permission checking
December 19, 2014, 09:00:33 am

from a brief look at the code:

1. does the searchTasks hook help you?

2. If not, i would do:

a. hack the Task.php code and get it to work for your use case

b. refactor the code so you can get it to work via a (new?) hook

c. contribute the hook code and docs back so that it can be incorporated in 4.6 :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Report and Search UI Discussion (Moderators: CiviTeacher.com, TwoMice) »
  • Custom Search task is hidden by CiviCore permission checking

This forum was archived on 2017-11-26.