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) »
  • How to limit a user to only accessing contacts he has created
Pages: [1]

Author Topic: How to limit a user to only accessing contacts he has created  (Read 651 times)

innovafire

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.1
  • PHP version: 5
How to limit a user to only accessing contacts he has created
October 04, 2011, 08:03:22 pm
I am seeking to make up a site where individuals can keep track of their own contacts individually.  I am using Drupal 6.22 and CiviCRM and I am just starting out on this.  The problem is that there seems to be no way built-in of keeping everyone's contacts from each other.  If I search for a contact made by another person, I can see it and I don't want that.

Looking at the DB structure, I see that the civicrm_contacts table has no column for "contact created by", and so I am assuming this is the first problem (which keeps me from making a custom view to accomplish my ends on this).

Does anyone have a successfully used workaround for trying to accomplish this?  Or any ideas?

Thanks.

Chris

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How to limit a user to only accessing contacts he has created
October 05, 2011, 01:39:38 am
Use the ACL hook to alter the where close and limit to the contact the logged in user created.

The data about creator/editor is stored in civicrm_log, Not sure from the top of my head there is a clear distinction between the two, but in your case, shouldn't make a difference.

Share the code if you succeed, seems like a fun idea.

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

innovafire

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.1
  • PHP version: 5
Re: How to limit a user to only accessing contacts he has created
October 05, 2011, 09:01:31 am
Thanks for pointing me to the table where the info is stored.

I get the concept of what you are saying I should do, but I have little knowledge relative to creating the module necessary to take advantage of that hook.

Any tips you could throw me as far as accomplishing this?


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • How to limit a user to only accessing contacts he has created

This forum was archived on 2017-11-26.