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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Negating ACL's...
Pages: [1]

Author Topic: Negating ACL's...  (Read 2293 times)

adshill

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 8
Negating ACL's...
August 26, 2009, 04:20:55 pm
ACL's have major problems with performance as far as I can tell... but we have a reasonably easy use-case of them that would seem straightforward, but is it?

WE have many groups, and we want all the registered users on the website to be added to one of these when they register or a civi account is created for them (appears to be at login). This I think we've cracked, at least for registration, using profiles.

However we don't want staff users to see all the site users in the contact database and at the moment this requires us to set a View permission in ACL's for every single group except the "Website Users" group. Is there a point and click way to negate or "Not View" a certain group? If not, is there a reason why this has never been developed? Do we have to use hooks for this?

Thanks,

Adam

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: Negating ACL's...
August 26, 2009, 05:39:21 pm

you can implement negation using ACL hooks. check:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmaclWhereClause

impementing a negation acl is quite trivial with a hook

If you think its important to get this feature in core, please consider sponsoring it / devoting some developer hours to it

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

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: Negating ACL's...
August 27, 2009, 11:01:48 am

also check:

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

it has the implementation of a negation group (HRD_SECURE_GROUP_ID)

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

adshill

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 8
Re: Negating ACL's...
August 27, 2009, 11:12:28 am
How much time would you think it would take (ie. cost) to sponsor the addition of a "Negate" checkbox on the ACL page?

I think it would be such a huge addition to ACL's.

We will look to write the ACL hook we need but I'm not sure we have the developer time to add it to ACL's admin right now. If someone else has some time, can do it reasonably quickly and it is not a massive investment, maybe we can work something out!

Adam

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: Negating ACL's...
August 27, 2009, 01:06:44 pm

Not looked into it enough to give you a number. In general trying to write a generic negate is significanly harder than doing it for one specific group in a hook. if u check the ACL hook implementation its fairly easy for a specific use case

I dont think its a trivial addition. If i had to guess between 40-100 hours or so

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

matth3wh

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
HRD module doc - spec?
January 19, 2010, 05:33:50 pm
Hi,
Trying to look in to the ACL system in a bit more detail - whether I DIY in the end or get a developer would be helpful to be better armed :-)

Is there a spec and/or documentation about the HRD module... ?

Will it work with CiviCRM 3.x ?  if you modify the .info file... ?

What changes does it bring / allow - how are they shown - in GUI ?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Negating ACL's...

This forum was archived on 2017-11-26.