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) »
  • ACL, Groups and User Permissions
Pages: [1]

Author Topic: ACL, Groups and User Permissions  (Read 623 times)

mcternan

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.10
  • MySQL version: 5.1.58
  • PHP version: 5.3
ACL, Groups and User Permissions
January 21, 2013, 12:59:18 am
I have seen mention of this elsewhere on the board, but I have not seen any recommendations/options in how to achieve it (if at all possible).

I have a requirement to limit users access/permissions to certain groups i.e.

User A views/edits Group A
User B views/edits Group B

This is easily achievable, but where I am stumped is in the next requirement.

Users should then be able to create their own smart groups from the contacts they can view. It appears that it is possible to do this, but since the users permissions are locked to their core group (User A -> Group A), they are unable to view the group they have just created.

I understand that the ACL does not currently support this scenario i.e. users being allowed access to groups they create, but I was wondering if there is a workaround to this? Is anyone aware of any modules that may allow this? I have come across the Organic Groups module, but I'm not sure if it suits my situation?

I'm also wondering if it would be possible to achieve this via Hooks? Would it be possible to create the ACL entries as the user creates the smart group?

Any ideas/input appreciated

Cheers,

Conor

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: ACL, Groups and User Permissions
January 21, 2013, 11:54:20 am
I think the aclGroup hook can change which groups are shown. Alternatively you can use the 'POST' hook to make the group a child of the parent group which *should* make it viewable.

The multisite module involves different urls but groups created on a multisite are automatically turned into child groups of the multisite group
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

mcternan

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.11
  • CMS version: Drupal 7.10
  • MySQL version: 5.1.58
  • PHP version: 5.3
Re: ACL, Groups and User Permissions
February 05, 2013, 06:15:33 pm
Thanks for the pointers Eileen. Could you elaborate a little on how the aclGroup hook could be used. The documentation on the wiki is a little sparse and I'm not sure I have a clear understanding on when this trigger would be fired.

Just to be clear, I am looking to add or update ACL's so that limited access users can view groups that they are creating. This would be happening on the fly and would generally happen via the search results action drop down i.e. users adding result sets to ad-hoc groups.

I have tried creating the new groups as children of a central group the users can view. It seems that when we do this the contents of the group are visible/available to the users, but the groups do not appear in the group listing (I expect this is because the user has not been granted explicit access to the group).

Conor

kennedy

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 5
  • CiviCRM version: 4.5.5
  • CMS version: Drupal
  • PHP version: 5.3.10
Re: ACL, Groups and User Permissions
February 13, 2013, 04:16:13 am
who has got this working? please advise !!

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: ACL, Groups and User Permissions
February 13, 2013, 06:51:43 am

I suspect your best bet would be to take the current hook documentation and see how far you can get with it.

As eileen said, you should use the OG group sync stuff and multisite stuff as some examples on how those hooks are used

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 »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • ACL, Groups and User Permissions

This forum was archived on 2017-11-26.