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 Multi-Site functionality »
  • Using standard ACLs for Groups within Multisite
Pages: [1]

Author Topic: Using standard ACLs for Groups within Multisite  (Read 2194 times)

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
Using standard ACLs for Groups within Multisite
April 08, 2010, 08:56:46 pm
I thought we had been over this ground but nothing in notes confirms that.

I am wanting to use standard ACLs within a multi-org so that on an L2 site we can set up an ACL Group with a Role that gives them permission to view/edit only a particular set of contacts as defined by a Smart Group.

I have just configured such an ACL on a standard (non-multi-org) and two different multi-org installations (ie completely unrelated developments).

The ACL works on the non-multi-org (as would be expected but proved to me that I set things up correctly) but it fails on both of the multi-org installations.

Can someone please confirm that they are using ACLs eg for an L2 and that it is working?
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

Roland-ST

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
Re: Using standard ACLs for Groups within Multisite
October 07, 2010, 05:19:37 am
Hi I faced the same problem. Also I realized that with enabled multi-site module for CiviCrm (http://svn.civicrm.org/tools/trunk/drupal/modules/multisite/) any contact can edit other contacts (ACL's have no effect here) related to his domain! We have multi-drupal sites with separate user DB for each domain and multi-org install of CiviCRM.

Roland-ST

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
Re: Using standard ACLs for Groups within Multisite
October 07, 2010, 05:21:12 am
I mean contact with just Access to CiviCRm drupal permission can edit other domain's contacts

vsharma012

  • Guest
Re: Using standard ACLs for Groups within Multisite
November 02, 2010, 12:11:00 pm
Hi
Did anybody find solution to this.

I am likely to deploy a multisite implement of civi with drupal.

Thanks
Vikas
http://www.mantrait.com

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Using standard ACLs for Groups within Multisite
November 21, 2010, 04:14:00 pm
We have been using multisites with ACLs provided via the ACL hook.

We edited this function in the multisite code to call our function


function multisite_civicrm_aclWhereClause( $type, &$tables, &$whereTables, &$contactID, &$where ) {

   if ( ! $contactID ) {
        return;
    }
    require_once 'CRM/Core/BAO/Domain.php';
    $groupID    = CRM_Core_BAO_Domain::getGroupId( );
    $childOrgs  = _multisite_get_all_child_groups( $groupID );

    if ( !empty($childOrgs) ) {
        $groupTable = 'civicrm_group_contact';
        $tables[$groupTable] = $whereTables[$groupTable] =
            "LEFT JOIN {$groupTable} multisiteGroupTable ON contact_a.id = multisiteGroupTable.contact_id";

        $where = "(multisiteGroupTable.group_id IN (" . implode(',', $childOrgs) . ") AND multisiteGroupTable.status IN ('Added') ";
        if (module_exists(fuzion_civicrm_tabs_acl)){
         $where .= fuzion_civicrm_tabs_acl_civicrm_aclWhereClause( $type, $tables, $whereTables, $contactID, $where, 1 );
      }
      $where .= ")";
    }
}
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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Multi-Site functionality »
  • Using standard ACLs for Groups within Multisite

This forum was archived on 2017-11-26.