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 »
  • Drupal Webform Integration »
  • One User - Two Organisations
Pages: [1]

Author Topic: One User - Two Organisations  (Read 536 times)

DWGray

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.4.6 (in development)
  • CMS version: Drupal 7
  • MySQL version: unknown
  • PHP version: unknown
One User - Two Organisations
December 21, 2014, 01:08:19 pm
Evening Everyone,

Apologies that I start getting blunt below. CiviCRM is driving me around in circles at the moment.


Scenario:
I use a webform to allow admins at organisations to update their organisation's details.
I use a static Existing Contact to load the details into the webform based on their login
One admin should not be able to access another organisation details

One admin becomes then responsible for two organisations

Problem:
How do I set it, so that if one user has two organisations, that they can select which one to update?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: One User - Two Organisations
December 21, 2014, 01:43:15 pm
I'm not sure how you have it configured currently, but I recommend that:

- Contact 1 on the webform should be of type individual and represent the logged-in user, not the organization
- Contact 2 should be the organization. You should make it an exsiting contact field of type "select" of organizations filtered down to just the type that we're talking about here. If your site permissions are configured correctly, then the logged-in admin will only see organizations they have permissions on in the list.
Try asking your question on the new CiviCRM help site.

DWGray

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 4.4.6 (in development)
  • CMS version: Drupal 7
  • MySQL version: unknown
  • PHP version: unknown
Re: One User - Two Organisations
December 21, 2014, 08:56:10 pm
Good Morning Coleman,
Sorry - My head was spinning after I wrote that and I just had to grab some shut eye.

I tried changing the settings and it is still right. I have created a test user purely to see if this works but I doubt I have the settings quite right as the individual can see all organizations.
The Civi tab of the webform
So I have my webform and in the CiviCRM tab I have Existing Contact checked for both the Individual and the Organization - there is nothing obvious that I can see that would otherwise affect the filtering of the select list.
The Webform tab of the webform
The Existing Contact for the individual is set for static and hidden, the user must be logged in.

The Existing Contact for the organization is set for:
Form Widget: Static List
Default Value > Set default contact from: Relationship to Station Administrator (That is the relationship that is set up for this)
Default Value  > Specify Relationships: Station Account (the organization) is Administered by Station Administrator
Filters > Enforce Permissions : Checked


Logically that says to me that the Station Administrator should only be able to see the Station Accounts he is registered to, but he can see them all.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Drupal Webform Integration »
  • One User - Two Organisations

This forum was archived on 2017-11-26.