This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

CiviCRM groups for Joomla access control

Aller directement à la fin des métadonnées
Aller au début des métadonnées

This page refers to outdated version of CiviCRM. Check current version of documentation.

Documentation Search

CiviCRM 3.2 Documentation

Support and Participation

Developer Resources

CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

A later and more refined version worked with Civi 2.0.7 and could be installed as a standard joomla component. If you install this on 2.0.8 it effectively downgrades to 2.0.7 as the security panic that created 2.0.8 broke any editing on the Joomla front end CiviCRM component. This will NOT work with any later version of Civi than 2.0.7

This whole area needs revisting with CiviCRM v3.1 - but it is probably worth waiting for Joomla 1.6 which has a more sophisticated access control system

This is a modification to two civicrm 2.0.4 files used in Joomla 1.5 which allows you to use CiviCRM groups as access control to front end CiviCRM menu items.
(This does not allow to set CiviCRM groups as access control to modules and content JUST front end CiviCRM items.)

As an additional benefit this gives a warning (but does not stop the user proceeding) if the Joomla and CiviCRM email addresses do not match. There may be users who want to use different emails for the website and whatever you are using CiviCRM for.

Be warned - this works with CiviCRM 2.0.2 and Joomla 1.5.3 - I have no idea if it is good for J1.0

The two files you need to modify are civicrm.xml which is found in

and civicrm.php which is found in

The mod to the xml file adds two new parameters when creating or editing a frontend CiviCRM menu entry from the adminstrator backend.
The first parameter allows you to specify a comma separated list of CiviCRM group ids which are allowed to access this menu item. 'public' bypasses the checking and '0' will allow any Joomla user who is also a CiviCRM contact to access.

The second parameter allows you to customise the message that the user sees if they do not have permission.

Here are the files - unzip, rename the originals so you dont loose them, and upload these

Here is the detail of the changes:

In civicrm.xml after about line 28

INSERT the following

This adds the new parameters. For the aclGroups parameter the value 'public' (the default) will bypass any access control. You can of course use the Joomla Access Level public/registered/special to control visibility of the menu item as well. If you put '0' for the group then any registered website user who is also a CiviCRM contact will be able to access the item. Registered users without a matching CiviCRM identity will be barred.

In civicrm.php about line 25 AFTER the line

INSERT the following lines:

then around old line 54 AFTER the lines

and BEFORE the line

INSERT the following lines

Since this only affects the Joomla specific files could it be checked, tested, improved and incorporated as it provides good additional functionality.



Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.