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) »
  • Profile access control
Pages: [1]

Author Topic: Profile access control  (Read 2222 times)

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Profile access control
October 12, 2007, 12:52:23 am
I'm just getting started with CiviCRM roles, in order to restrict access to specific profiles.

I have configured a first profile which should allow our organisational staff to view members by region (using custom data fields that pertain to branch, electorate, and province). This profile should only be available to staff who are logged in.

I also have a site registration form, which I want to make available to anonymous users.

However, on setting up the permissions for that profile I see this message:
Code: [Select]
The Drupal permissions for "access all custom data" and "profile listings and forms"
 override and disable specific ACL settings for custom field groups and profiles
 respectively. Do not enable those Drupal permissions for a Drupal role if you
 want to use CiviCRM ACL's to control access.

As I understand it, in order to let anonymous users register for membership I need to allow anonymous users access to "access all custom data" and "profile listings and forms". In the wiki page on Linking Profiles, the documentation says
Code: [Select]
* For anonymous users to access the sign-up form, you need to give anonymous users
   permission to access "profile listings and forms".
 * If you are using custom fields in your profiles and want anonymous users to access the form,
   you also need to give anonymous users permisison on "access all custom data"

But in order to restrict access per profile, I need to *not* allow anonymous users access to "profile listings and forms".

When testing this, I found that if I disable the capability for anonymous users to access "profile listings and forms", CiviCRM throws a "non-recoverable error" when an anonymous user tries to access the registration form. Disabling access to "access all custom data" didn't throw any errors, but may just prevent me from gathering custom data on registration.

It seems odd for these two valuable features to preclude each other ... I'm guessing that I just need to work out how to configure the permissions correctly.

I can't see a way to add a CiviCRM ACL that applies to anonymous users, otherwise I guess I could create a ACL for the anonymous users to access only the registration profile(s) and allow staff-only access to the profiles they need.
« Last Edit: October 12, 2007, 12:56:20 am by xurizaemon »
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Profile access control
October 24, 2007, 12:51:05 pm
I dealt with this for us using Drupal's path access control mechanism, installing the pathaccess module and adding a configuration for anonymous user to "access every page except the listed pages" with a value of "civicrm/profile*" in the pages field.

This seems to be working OK on our test site, but I'm sure there must be a better way? DaveG, any thoughts/comments?
@xurizaemon ● www.fuzion.co.nz

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: Profile access control
October 24, 2007, 01:02:42 pm

Chris:

we can chat more on this on IM

There are "special" ACL groups that are pre-created for anonymous and authenticated user. So can you use those groups to give anon users accesss to only the specific profile you want exposed, and give auth users access to another profile?

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

jday

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 6
  • CiviCRM version: 4.2
  • CMS version: 7.15
Re: Profile access control
February 24, 2009, 02:01:44 pm
I would like anonymous and authenticated users to access registration profile forms, newsletter subscription, and donation page but Not have access to profile listings

how do you break up the 'profile listings and forms' permission? expose forms but hide listings?

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: Profile access control
February 24, 2009, 08:53:21 pm

this is currently not possible. I suspect we need to address this in a future 2.x release

wanna file an issue

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

jday

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 6
  • CiviCRM version: 4.2
  • CMS version: 7.15
Re: Profile access control
February 24, 2009, 09:49:42 pm
issue reported:
http://issues.civicrm.org/jira/browse/CRM-4170

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Profile access control
February 25, 2009, 09:17:17 am
Thanks for filing the issue. We'll handle permissions for the create / edit forms separately in 2.3. Until then there's a decent work-around that you can use to prevent folks from accessing listings of contacts that you don't want to expose:

* Create a new group - you could call it "Public Group" for example. Put one or more contact records in that group that you're fine about the public seeing (it could be just an Organization contact record for the organization that owns the CiviCRM installation).

* Go to Settings for your Create / Edit Profile - open Advanced Settings pane - and select that group in the "Limit listings to a specific Group?" drop-down.

Now if anyone "finds" the listings URL - the only records they can see are the one(s) in your Public Group.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Profile access control

This forum was archived on 2017-11-26.