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 »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • Show me only records I've entered?
Pages: [1]

Author Topic: Show me only records I've entered?  (Read 1702 times)

jfulton

  • Guest
Show me only records I've entered?
September 20, 2007, 04:23:48 pm
I'm wondering if I can use CiviCRM for a project I have:

I need to allow 70 or so editors to enter user records, however none of those editors should have access to other editors records.  When an editor logs back in they should only be allowed to see records they've entered.

The editors will come to a Drupal site to register and upon being confirmed by an administrator will be put in a role able to access CiviCRM

I've been using CiviCRM for a while (older version) but don't think I've ever seen this functionality.  I don't think that the Drupal Access Controls would work for this and it doesn't look like I can do this with ACL unless CiviCRM can automatically create a group per editor and we assign the editor to that group?  It needs to be as simple as possible.

Any info helpful, might just hand code something if CiviCRM isn't the right tool.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Show me only records I've entered?
September 20, 2007, 05:15:38 pm
This model of permissioning based on records created/owned by a contact has come up as a requirement a number of times - and I suspect we'll figure out a reasonable solution for it at some point. However, for now I think you could use a combination of the existing ACL functionality with some custom code that implements a Drupal hook to create the ACL group and the "contacts owned by this editor group" for each editor when they are assigned to the Editor role - and implements a CiviCRM hook to put each newly created contact into the appropriate editor's group on create.

Combined w/ giving the Editor role the "add contacts" permission in CiviCRM - this approach might be workable.
Protect your investment in CiviCRM by  becoming a Member!

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: Show me only records I've entered?
September 20, 2007, 11:46:04 pm

You might want to check some of the code we just wrote for a custom contract. It basically creates and ACL and the related entries for an organic group. You could modify it for your needs fairly easily i think.

The code is currently on our svn v1.9 branch:

http://svn.civicrm.org/branches/v1.9/drupal/civicrm_og_sync.module

most of the work is done by the helper functions in:

http://svn.civicrm.org/branches/v1.9/CRM/Bridge/OG/

Some more details at: http://civicrm.org/node/244

Note that ACL's technically do not require a civicrm_group, you can also use a civicrm_contact. We have not exposed that feature, but in your use case below that might be an easy way out

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) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • Show me only records I've entered?

This forum was archived on 2017-11-26.