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 Import (Moderator: Yashodha Chaku) »
  • Automatically assign view/update permissions when importing relationships?
Pages: [1]

Author Topic: Automatically assign view/update permissions when importing relationships?  (Read 733 times)

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Automatically assign view/update permissions when importing relationships?
June 12, 2012, 11:01:26 am
When adding a relationship manually - one can check the box "Selected contact(s) can view and update information for ...".

Can this be done during an import? I can bulk import all the relationships fine - that's all working. I just need to figure out how to give them all an * - as in "yes" - all parents can update their child's records.

-- Karin

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Automatically assign view/update permissions when importing relationships?
June 12, 2012, 11:16:21 am
i don't think you can do that via import, and as far as i know that is not an option that could be set through batch update via profile (but double check that -- instructions are here in case you need them: http://wiki.civicrm.org/confluence/display/CRMDOC32/Batch+Update+via+Profile).

a workaround would be to import them all and assign a newly created tag on import. then do an advanced search on the group and export the contact ids. then you could write a db query to manually set that flag for those contacts. not ideal but it should work (backup first before you mess with the db).

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: Automatically assign view/update permissions when importing relationships?
June 12, 2012, 11:20:35 am
We were thinking db query / script, but I was hoping we had missed a button somewhere. This db update should be pretty straight forward though. Thanks for getting back to me!

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: Automatically assign view/update permissions when importing relationships?
June 13, 2012, 10:17:34 am
I just had a look at the table civicrm_relationship (in 4.1), which has columns for relationship_type_id and is_permission_a_b and is_permission_b_a.

So something like:

UPDATE civicrm_relationship SET is_permission_b_a = 1 WHERE relationship_type_id = 1

will allow all parents to edit their children.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Automatically assign view/update permissions when importing relationships?

This forum was archived on 2017-11-26.