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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Restrict Access to Profile Fields
Pages: [1]

Author Topic: Restrict Access to Profile Fields  (Read 771 times)

dwatts3624

  • Guest
Restrict Access to Profile Fields
November 03, 2010, 05:08:13 pm
Hello,

I've been wading through documentation and the interface itself to figure out the best method to accomplish my goal here.  I thought that the forums might be a good place for some advice since I'm pretty conflicted as to the direction I should take.

The goal is to configure CiviCRM profile fields that are accessible to a Drupal administrator but not the users (eg. we can create new users in drupal and are able to set the view-only fields at that time).

I've looked at making them view-only in the profile but that also makes them view-only to Drupal administrators.  ACLs don't seem to be the right solution - but I might be missing something.  I'm currently leaning towards customizing the profile template so that the fields don't display as form fields in edit mode (in Drupal).  I guess we could just leave them view-only and update the contacts in CiviCRM once they have been created in Drupal but I'd rather automate the process - especially since volunteers may be owning it.

Any suggestions?

Thank you in advance!  As always, the feedback I receive here is very much appreciated and I will do what I can to help with community documentation as progress is made! :)

Danny

Jason W

  • I post frequently
  • ***
  • Posts: 197
  • Karma: 12
  • jason@civitrainingtutorials.com
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.x.x
Re: Restrict Access to Profile Fields
October 02, 2012, 10:20:19 am
Hello Danny,

It seems to me, that your case is a perfect situation for ACLs.

1. Create a Drupal Admin group.

2. Create a Drupal Admin Role, and assign your Drupal Admin group to it.

3. Create an ACL in which Drupal Admin(role) control All operations over A Profile(type of data). Now select your profile from the "profile" dropdown, check enable and save.

This method will allow you to choose who can access certain profiles, but in order for it to work properly, you are going to have to uncheck the Profiles permissions in Drupal. You will also need to create ACLs for each Profile you have already created, and for each new one as you create it. However, you will be able to set who does what to your profiles.

Cheers,
Jason
civiTrainingTutorials
"Helping You Help Others"

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Restrict Access to Profile Fields

This forum was archived on 2017-11-26.