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) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • disable export
Pages: [1] 2

Author Topic: disable export  (Read 3256 times)

CatorgHans

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.4
  • CMS version: drupal
disable export
February 02, 2012, 01:21:41 pm
Some organisations allow logged in people to see all contacts, but don't want them to export to csv.
CiviCrm normally does not have that option.

I made a drupal6 module to add an extra permission: "civicrm export".
Roles who have that option disabled will have no "export" option in the Search Results.

The code is based on the comments in this forum thread
http://forum.civicrm.org/index.php/topic,16571.msg70950.html#msg70950

The small module can be found here https://github.com/catorghans/civi_exportlimiter
« Last Edit: February 02, 2012, 01:23:18 pm by CatorgHans »

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: disable export
February 05, 2012, 05:28:05 am
Good stuff, thanks for sharing!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

civifan

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.67-0ubuntu0.11.10.1
  • PHP version: 5.3.6-13ubuntu3.10
Re: disable export
February 13, 2012, 12:57:51 am
Great idea  ;D  It really should be easy to switch this capability on or off by Drupal Role.

Does this work with Drupal 7.x  ???  If not, is this a near term possibility?

CatorgHans

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.4
  • CMS version: drupal
Re: disable export
February 13, 2012, 01:01:04 am
It's only a civihook. should not be difficult.
I will have a look this week

civifan

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.67-0ubuntu0.11.10.1
  • PHP version: 5.3.6-13ubuntu3.10
Re: disable export
February 16, 2012, 04:04:38 pm
Any luck?

CatorgHans

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.4
  • CMS version: drupal
Re: disable export
February 17, 2012, 02:27:13 am
yep,

here's the drupal7 version
https://github.com/catorghans/civi_exportlimiter7

civifan

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.67-0ubuntu0.11.10.1
  • PHP version: 5.3.6-13ubuntu3.10
Re: disable export
February 29, 2012, 08:13:07 pm
How can determine which Drupal roles can select "Export Contacts" in the task menu?  I'm unable to find it in the permissions in Drupal...

CatorgHans

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.4
  • CMS version: drupal
Re: disable export
March 01, 2012, 12:28:41 am
yes, it should be in the permissions:

Civicrm Export Limiter
civicrm export

I build and tested in 4.07.
Do you see it, and which version do you have?

civifan

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.67-0ubuntu0.11.10.1
  • PHP version: 5.3.6-13ubuntu3.10
Re: disable export
March 09, 2012, 07:37:23 pm
4.0.6

Is there some dependency on a module that perhaps we haven't loaded.

CatorgHans

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.4
  • CMS version: drupal
Re: disable export
March 09, 2012, 10:25:53 pm
This is what I see in permission table in 4.0.7


civifan

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.67-0ubuntu0.11.10.1
  • PHP version: 5.3.6-13ubuntu3.10
Re: disable export
March 19, 2012, 11:58:03 am
Thanks.  I did get it working, but there is another mysterious occurence in the Search Result dropdown that I'll specify later today.

CatorgHans

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.4
  • CMS version: drupal
Re: disable export
March 20, 2012, 03:48:44 am
Cool that you got it working..

Another way to "Export" in certain circumstances? Please tell :)

civifan

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.67-0ubuntu0.11.10.1
  • PHP version: 5.3.6-13ubuntu3.10
Re: disable export
April 18, 2012, 05:20:36 pm
Blank Item in Search Results Action Dropdown - showed up after install Disable CiviCRM Exports Hook...only for users who don't have exports enabled...

civifan

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.2.9
  • CMS version: Drupal 7.22
  • MySQL version: 5.1.67-0ubuntu0.11.10.1
  • PHP version: 5.3.6-13ubuntu3.10
Re: disable export
April 18, 2012, 05:31:10 pm
Other Export capability that still works and can't be turned off in CiviReports => "Export to CSV" button

CatorgHans

  • I post frequently
  • ***
  • Posts: 157
  • Karma: 5
  • CiviCRM version: 4.4
  • CMS version: drupal
Re: disable export
April 20, 2012, 01:07:04 am
Never thought about the Export to CSV in reports. Thanks!

Will also look at the other issue. Although I don't have that.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • disable export

This forum was archived on 2017-11-26.