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 Drupal Modules (Moderator: Donald Lobo) »
  • webform_civicrm error: "missing permission: view all contacts"
Pages: [1]

Author Topic: webform_civicrm error: "missing permission: view all contacts"  (Read 1216 times)

baergaj

  • I’m new here
  • *
  • Posts: 8
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.16
  • MySQL version: 5.5.27
  • PHP version: 5.3.17
webform_civicrm error: "missing permission: view all contacts"
April 09, 2013, 12:33:44 am
I have a webform set up to set a default contact in Contact 2 based on a relationship to the currently logged in user in Contact 1 (Contact 2 is the child of Contact 1).

It works if I am logged in as an administrator, but when I log in as an authenticated user  I get an error about "missing permission: view all contacts".

If I give the authenticated user role permission to view all contacts, it works, but this isn't acceptable as our entire database will be exposed in the autocomplete field.

I have included the full error message below.

Any ideas? Thanks in advance!


Type   webform_civicrm
Date   Tuesday, April 9, 2013 - 01:22
User   lmbaerg
Location   http://www.camp-evergreen.com/drupal/node/6
Referrer   
Message   The CiviCRM "contact get" API function returned the error: "API permission check failed for contact/get call; missing permission: view all contacts." when called by line 697 of contact_component.inc with the following parameters: "Array ( [is_deleted] => 0 [contact_type] => Individual [check_permissions] => 1 [id] => 3383 [return.display_name] => 1 [version] => 3 ) "
Severity   error

kennedy

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 5
  • CiviCRM version: 4.5.5
  • CMS version: Drupal
  • PHP version: 5.3.10
Re: webform_civicrm error: "missing permission: view all contacts"
April 17, 2013, 01:05:41 pm
 I guess you might want to review the filters section of contact 2, the check box that says "Enforce Permissions", click on edit on contact 2 (relationship to contact 1) and scroll to the FILTERS.
Hope this helps.

baergaj

  • I’m new here
  • *
  • Posts: 8
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.16
  • MySQL version: 5.5.27
  • PHP version: 5.3.17
Re: webform_civicrm error: "missing permission: view all contacts"
April 21, 2013, 10:46:40 am
I still am not able to get this working. What I am trying to do is the following:

I have 2 contacts in the webform. Both are set to "existing contact" on the civicrm tab.

Contact 1 is set to Default Value of "current user".

Contact 2 is set to Default Value of "relationship to contact 1", "spouse of contact 1". I do not have any filters set, but "enforce permissions" is checked off.

I have 2 contacts in civicrm who have an active "spouse of" relationship to each other. The relationship is permissioned on both sides.

When I log in as one of the contacts and view the webform, Contact 2 is not filled in by default, and if I use the autocomplete field, it fails to bring up any results.

If I uncheck "Enforce Permissions", Contact 2 is filled in correctly, but I can also search the entire contact database using the autocomplete field, which is not acceptable.

In the drupal logs, I am getting the error "missing permission: view all contacts". Again, if I give the Authenticated User role permission to view all contacts, Contact 2 is filled in correctly, but I run into the same issue of exposing our entire contact database through the autocomplete field.

Am I missing something? Is this type of thing supposed to work using Webforms?

Thanks for any help!

Andrew


kennedy

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 5
  • CiviCRM version: 4.5.5
  • CMS version: Drupal
  • PHP version: 5.3.10
Re: webform_civicrm error: "missing permission: view all contacts"
April 21, 2013, 03:25:24 pm
Hi Andrew,
have you tried using ACLs?

baergaj

  • I’m new here
  • *
  • Posts: 8
  • Karma: 1
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.16
  • MySQL version: 5.5.27
  • PHP version: 5.3.17
Re: webform_civicrm error: "missing permission: view all contacts"
April 21, 2013, 09:15:01 pm
No I haven't. Is that required in order to get this kind of thing working? I didn't see that mentioned anywhere at http://drupal.org/node/1615380

What would I need to set up with ACLs?

kennedy

  • I post occasionally
  • **
  • Posts: 119
  • Karma: 5
  • CiviCRM version: 4.5.5
  • CMS version: Drupal
  • PHP version: 5.3.10
Re: webform_civicrm error: "missing permission: view all contacts"
April 22, 2013, 04:47:58 am
my idea is that you should create a group in civicrm and add the contacts you want exposed to this group, then create an ACL role and give the edit permissions to this group of contacts.
Now in the filters section you can select only this group to be exposed.
hope this helps.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • webform_civicrm error: "missing permission: view all contacts"

This forum was archived on 2017-11-26.