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) »
  • Are ACLs really this limited?
Pages: [1]

Author Topic: Are ACLs really this limited?  (Read 2720 times)

alevy

  • Guest
Are ACLs really this limited?
December 01, 2008, 12:16:25 pm
I've been looking/trying for several hours now, and a fairly simple ACL setup is proving to be nearly impossible for CiviCRM 2.0

The Case:
Private drupal intranet
civicrm used for cross-organization and program specific contacts
most contacts can be viewed/edited by staff
some contacts can only be viewed/edited by certain program staff.

Example:
By default contacts are "public" (any staff member can view/edit)
If a contact is added to group "Program X" only members of the group "View/Edit Program X" can view and edit those contacts.

Seems simple? Maybe I'm missing something.

First roadblock - Automatically adding 'staff' members to the 'staff' group:
 - Cannot use Smart Groups for ACLs
 - Drupal syncing only goes civimember -> drupal role and not drupal role -> civigroup

Second Roadblock - unrelated ACLs essentially limit any contacts without a group
 - contacts without groups should not change how they are affected by adding an ACL for contacts with a particular group.
 - this functionality necessitates the following:

Third roadblock - Adding contacts to a group by default
 - only necessary because adding the first ACL essentially limits all contacts (ex. no ACLs - all contacts show fine ||| add an ACL for group 'Program X' and now any contact without a group cannot be viewed.)
 - Even if smart groups could be used for ACL - cannot use negative logic (all contacts NOT part of 'Program XYZ')
---------------------

Besides doing everything manually, which making sure the staff knows that every contacts must be added to a particular group (eg, public or program specific), is there a way to do the following in a more automated manor:

1. Restrict access to contacts within a particular group
2. while allowing the rest of the contacts to remain unrestricted

What am I missing? It can't be this limited.



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: Are ACLs really this limited?
December 01, 2008, 12:28:04 pm

a generic powerful implementation of acl is a bit hard as we've realized (if you think differently, feel free to submit code that addresses your issues). Our current ACL implementation is limited and not very scalable

To resolve this, we've introduced ACL hooks in 2.1 and later. An implementation for your use case can be found here:

http://svn.civicrm.org/hrd/trunk/drupal/hrd.module

the functions: hrd_civicrm_aclWhereClause and hrd_civicrm_aclGroup are the hook implementations. The function hrd_perm exposes it as a drupal permission.

u can ping us on IRC if u have any questions/queries

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

alevy

  • Guest
Re: Are ACLs really this limited?
December 01, 2008, 01:59:42 pm
Thanks for the reply,

I was really hoping for a "omg it's so easy - you missed XYZ".

Unfortunately, I can't upgrade to 2.1 until I can go to Drupal 6 (come on Panels2!)
-----------------------

I also saw this post: http://issues.civicrm.org/jira/browse/CRM-3007 , and I cannot agree more. In addition to ACLs not meeting simple requirements, certain design choices are truly baffling (drupal group to civicrm group to civicrm role to civicrm acl ??? why on earth is this necessary).

Also the mixing of content groups and administrative groups merely adds confusion with zero functionality.

I'm sorry for the rant - but this is a surprisingly unintuitive access system. Hopefully this has been fixed in 2.1 (I haven't tested yet), and documentation (or commented code!) seems sparse.



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: Are ACLs really this limited?
December 01, 2008, 04:32:52 pm

a couple of thoughts and comments:

1. drupal groups are not part of the ACL system. I do agree that acl groups should have been skipped. I suspect we thought it was a cleaner design but did not realize the ramifications and end-user pain :(

2. while ranting is fine it does not really help the project. Contributing code / improving documentation / providing examples is a much more efficient use of your time and ours :)

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Are ACLs really this limited?
December 01, 2008, 09:24:44 pm
Lobo - I am wondering if the ACL-work around that we implemented would be useful to others. It has been covered in both the Forum and the Wiki - but is this something I should try and lean on Chris to add to the documentation - or is there still some addition to the core that has to be done.

It certainly seems like it would answer the needs of http://issues.civicrm.org/jira/browse/CRM-3007

I can't believe how easy this version of 'access control' that we have is.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Are ACLs really this limited?
December 02, 2008, 06:08:03 am

Pete:

the hooks and implementation we did for HRD was the inclusion of the the NZ greens stuff for core. So all that is part of core right now :)

i think folks dont understand / appreciate that designing a generic scalable ACL's system is relatively complex.

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Are ACLs really this limited?
December 02, 2008, 10:51:52 am
Cool - but guess I am still unclear if the route we took is well covered in the documentation so people know there is another route they could consider.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

alevy

  • Guest
Re: Are ACLs really this limited?
December 02, 2008, 10:59:21 am
Peterd,

Can you please link to the forum/wiki posts to which you refer (did a quick search and I'm not coming up with much relevant.

edit:

Is this what you are refering to: http://forum.civicrm.org/index.php/topic,3695.0.html
« Last Edit: December 02, 2008, 11:06:35 am by alevy »

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Are ACLs really this limited?
December 02, 2008, 11:29:59 am
Yep - was just about to add but saw you had edited.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Are ACLs really this limited?
December 02, 2008, 11:31:09 am
So that option should be available for you for 2.0 if the 2.1 updates aren't back portable.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Are ACLs really this limited?

This forum was archived on 2017-11-26.