Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-3861

API should throw error when data is saved to a custom field that the user does not have access to

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.1
    • Fix Version/s: 4.3.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Currently if civicrm_contact_add() (and presumably any other API *_add function) is used to save to a custom field, and the current user does not have the "access all custom data" permission (or an enabling CiviCRM ACL I'm presuming), the contact is saved successfully and the returned contact looks something like:

      array (
      'contact_id' => '19679',
      'contact_type' => 'Individual',
      'custom' => array (
      ),
      'is_deceased' => false,
      )

      no errors are thrown. This is not very developer friendly since there is no obvious way to know that this perm is required.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dalin dave hansen-lange
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: