I am currently using D7.35 and Civi4.4.14

We have custom relationships on our Civi installation. What I would like them to do is give the individual permission to view and edit the organisation which for some reason worked in development and not in the real world.... I think because the first tick box is unticked.... right?:

Relationship Box

So there are probably two questions:

  1. Am I Right?
  2. How can I get Civi to allocate this automatically?

There is a bit of further information.

Our developer custom coded the module designed for our member management system. So a Station Administrator (as per the picture) and promote or demote within his station without our intervention using a custom page where a number of relationships are managed.


There is an extension that does exactly what you're looking for:

Relationship Permissions as ACLs

The release on the extensions page only does 1 thing (setting permissioned relationships to actually give acl permissions to those contacts, which CiviCRM does not do by default) but if you download the extension directly from github, it has the feature you are looking for (automatically adding certain permissions for certain relationship types). I believe the reason you have to download that version manually is because of a dependency on another extension (also available from github) and the automatic extension downloader does not resolve dependencies.

  • Evening Coleman, I have just read through the requirements of Entity Settings and the 1.2 branch of Relationship Permissions. I think this is going to need me to go much deeper into the code of the site than I am competent at doing. To me it looks like I have to go in via the file system to install 1.2? It looks like I will be batting this off to our developers to do! Thank you for your help though... – Darren Whittenham-Gray Apr 2 '15 at 21:35
  • Good luck getting it working :) – Coleman Apr 3 '15 at 1:00

Yes, that checkbox must be checked. (The one reflecting the specific "direction" you wish.

I don't think you can configure this to occur automatically, however since you have custom code, it should be possible to add the permission automatically using an API call (the parameter name I believe is is_permission_a_b or is_permission_b_a).

Here's an API call:

$result = civicrm_api3('Relationship', 'create', array(
  'sequential' => 1,
  'contact_id_a' => "",
  'contact_id_b' => "",
  'relationship_type_id' => "",
  'is_permission_a_b' => "",
  'is_permission_b_a' => "",
  • Thank you for your answer k3ix. I am surprised that there is not a feature on a relationship to say that (in this example) the individual will automatically be able to view and edit the information on the basis that they are a station administrator. I may be putting in a new support ticket! – Darren Whittenham-Gray Apr 2 '15 at 18:05
  • Darren, I suspect that such capability may have been intentionally omitted. It would be too easy for a system to be configured to always set the permission and then forget about it.... with ultimately some contacts getting permissioned where they shouldn't be. – DaveD - BackOffice Thinking Apr 2 '15 at 18:27
  • It would be bad to always grant the permission on employee relationships: if you collect employer name on a public form, someone could just change employer repeatedly to get access to a bunch of contacts. – Andrew Hunt Apr 3 '15 at 2:35

Relationship Permissions as ACLs doesn't fully work in CiviCRM 4.6.x (please refer to issue here https://issues.civicrm.org/jira/browse/CRM-17349)

There is a good news for "permissioned relationships" fans: sounds like CiviCRM (at least 4.6.10) not only allows "one to one" permissions via relationship; it has also build-in support for inherited permissions via relationships via "Allow second-degree relationship permissions" radio button at Administer->System settings->Misc .

It's truly brilliant for use cases, where (quote): contacts with the permission to edit a related contact will inherit that contact's permission to edit other related contacts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.