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 (Moderator: Dave Greenberg) »
  • Using Groups and ACLs
Pages: [1]

Author Topic: Using Groups and ACLs  (Read 2547 times)

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Using Groups and ACLs
June 06, 2007, 06:38:58 pm
I'm new to Drupal & CiviCRM, and trying to accomplish 2 related things, and would greatly appreciate any guidance to how to set them up. I'm not really a programmer, though I understand the "hello world" basics of PHP, but would rather not start tinkering with code. I'm hoping the ACL system already makes this possible, and I'm just not viewing it correctly...

1.) When a user with a specific ACL role creates a new Individual contact record via the shortcut block, I'd like that new record to be automatically added to a particular group. E.g., when a user with the role "Chapter X Staff" adds a new contact, I want that contact automatically added to the "Chapter X contacts" group.

2.) When a user a role with permission to manage groups creates a new group, they should automatically have permission to view that group. I though this would be assumed, but apparently not, unless I've errored somewhere.

Thanks,

Matt
« Last Edit: June 07, 2007, 11:42:14 am by mchapman2000 »
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

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: Using Groups and ACLs
June 06, 2007, 07:20:17 pm

Matt:

Unfortunately I dont think either of the two are possible without some amount of coding (beyond hello, world!)

for point 1 below, u could dynamically create a link and add a default group based on the user's current group (use the gid=XXX parameter to new individual call).

If you need more details, we can chat on IRC

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

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: Using Groups and ACLs
June 07, 2007, 11:06:21 am
For the benefit of future searchers, Here's the work around for problem (1) which is roughly sufficient for my situation:

1.) I created a smart group for contacts who are NOT labeled 'Do Not Share' called 'Shared Contacts' (which will include new contacts by default.)
2.) I granted permission to my 'staff' role to Edit contacts in the group 'Shared Contacts'
3.) Now when a new record is created, it is by default available to all my 'staff' users, although it will still be necessarily to manually add that individual to any chapter groups, at least contacts created via the shortcut block don't disappear into oblivion.


Now I just have to figure out a means to grant users access to the groups they've created... probably time to break out the PHP manual...

To any lurking developers: I'd be great to translate the 'smart groups' concept into a 'smart ACL' feature. When a group is created with characteristic X, permission is automatically granted to role Y.

This is probably beyond my skill, and in this case, I will likely end up hardcoding something very specific to my needs.

Best,

Matt
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: Using Groups and ACLs
June 07, 2007, 11:41:59 am
I've just discovered the Organic Groups drupal module & it's CiviCRM integration....

Does anyone have any experience with these, and any thoughts on whether this might be an effective way to accomplish my (2) goal?

Best,

Matt
Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Matt2000

  • I post frequently
  • ***
  • Posts: 288
  • Karma: 27
    • http://www.ninjitsuweb.com
Re: Using Groups and ACLs
July 03, 2007, 09:13:41 pm
I wrote some code to run in a Drupal block to solve problem (2) above.

It can be found here:

http://wiki.civicrm.org/confluence/display/CRMDOC/Create+Group+with+ACL+Permissions

Drupal/CiviCRM micro-blogging http://twitter.com/matt2000

Ninjitsu Web Development http://www.NinjitsuWeb.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • Using Groups and ACLs

This forum was archived on 2017-11-26.