Restricting access to custom fields
There may be situations where you will want to restrict sensitive confidential data to certain roles. For example, in a drug rehabilitation center it would be critical to ensure that any client confidential data is only viewable and editable by client caseworkers and other authorized people.
How to do it…
In this recipe, we will have a group of volunteer managers who will be able to edit custom fields for volunteer information. We will remove any overriding CMS permissions and use CiviCRM ACLs to provide permissions for custom data.
- In Drupal, navigate to People | Permissions | Roles. Create a role called
CiviCRM Admin
. - In Drupal, navigate to People | Permissions, and remove the Access all custom data permission for all roles. Removing the Access all custom data permission is not without it's difficulties. It means that every time you add a new custom field, you will have to add permissions using CiviCRM, rather than globally in your CMS. This...