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 »
  • Using Webform to delete a Relationship ?
Pages: 1 [2]

Author Topic: Using Webform to delete a Relationship ?  (Read 1695 times)

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Using Webform to delete a Relationship ?
January 03, 2015, 10:13:57 am
Quote
I would assume that checking the "Enforce Permissions" option would limit the selection.
What's the basis for your assumption? What have you done with CiviCRM acls to make sure an admin can only see their related org?
You might need this extension: https://civicrm.org/extensions/relationship-permissions-acls

Quote
I switched the organisation to contact 1 and the admin to contact 2 does not seem to work because it hides all of the webform in place.
Not recommended. Contact 1 should always represent the person filling out the form.
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: Using Webform to delete a Relationship ?
January 04, 2015, 11:03:24 am
Quote from: Coleman Watts on January 03, 2015, 10:13:57 am
Quote
I would assume that checking the "Enforce Permissions" option would limit the selection.
What's the basis for your assumption? What have you done with CiviCRM acls to make sure an admin can only see their related org?
You might need this extension: https://civicrm.org/extensions/relationship-permissions-acls

The company currently developing the site have created a custom page where the admin can see all the contacts associated with their organisation so that they can undertake a number of tasks such as removing their relationship or promoting them to also be an admin.

the only extension i can see listed though is the payment processor.

Quote
Quote
I switched the organisation to contact 1 and the admin to contact 2 does not seem to work because it hides all of the webform in place.
Not recommended. Contact 1 should always represent the person filling out the form.

Yes, I did assume that was the logical before trying it to see what would happen


I am thinking that I must be missing something so obvious to be at the point of this complexity.
All we want to do is prevent more than 1 person holding the "Main Contact" relationship, and if an admin tries to assign a second person to it; to error and ask them to remove the existing one first (or expiring the relationship for them)

The Head of Household scenario clearly infers that this is not possible though
« Last Edit: January 04, 2015, 11:14:38 am by DWGray »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Using Webform to delete a Relationship ?
January 04, 2015, 12:24:50 pm
Code: [Select]
The company currently developing the site have created a custom page where the admin can see all the contacts associated with their organisation so that they can undertake a number of tasks such as removing their relationship or promoting them to also be an admin.This sounds like not a real acl rule. My advice would be to give these users no permission to see any contacts in the db, install the above extension and set up the relationships as permissioned. Whitelist is safer than blacklist (which would be still safer than what you're doing which seems to be no permissions restrictions at all).
Try asking your question on the new CiviCRM help site.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Using Webform to delete a Relationship ?
January 12, 2015, 01:30:24 pm
I just needed to test something related to this.

Instead of using End Date, I just used the Is Active field and set to User Select

In this use case it was so that Partner A (ie the primary contact) can check their details and at same time can see the name of Partner B (whom they have Permissioned Relationship to) and update the details for that person, or flag that they no longer wish to have them noted as Partner B.

We can then set up an Activity so an Admin gets notified so that they can decided how to treat the ex-Partner B
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Using Webform to delete a Relationship ?
January 28, 2015, 06:25:09 am
Quote from: Coleman Watts on January 04, 2015, 12:24:50 pm
Code: [Select]
The company currently developing the site have created a custom page where the admin can see all the contacts associated with their organisation so that they can undertake a number of tasks such as removing their relationship or promoting them to also be an admin.This sounds like not a real acl rule. My advice would be to give these users no permission to see any contacts in the db, install the above extension and set up the relationships as permissioned. Whitelist is safer than blacklist (which would be still safer than what you're doing which seems to be no permissions restrictions at all).

Just to follow up on progress for this, our developer has taken a different route, so I have not been able to really get involved in the tinkering while they are still develolping for us.

Once we launch then I will hopefully get a copy of the whole drupal / civi installation as it is set up so that I can tinker in an isolated sandbox.

Thanks for your assistance; hopefully I will get something going once we get the actual site launched.

JMM

  • I post occasionally
  • **
  • Posts: 67
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Using Webform to delete a Relationship ?
January 29, 2015, 02:08:56 am
I don't know if this can help :

A webform can be restricted to a Type of Organization (Contact 1) and a Drupal Role (via ACCESS CONTROL)

So, an easy way to restrict a Webform to an Organization Admin is to define this Organization as belonging to a Type of Organization to which the restriction applies, and give to its Admin a Drupal Role enabling the Webform (via ACCESS CONTROL)

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Drupal Webform Integration »
  • Using Webform to delete a Relationship ?

This forum was archived on 2017-11-26.