Details
-
Type:
New Feature
-
Status: Done/Fixed
-
Priority:
Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.1
-
Fix Version/s: 2.1
-
Component/s: Core CiviCRM
-
Labels:None
Description
(This specification supports the use cases described here: http://blog.civicrm.org/node/318 )
1. Add permissioned property to the Relationship object
===========================================
For this implementation, permissioning is on / off (not operation-specific).
1.1 Permissioning is "directional" so we need the following new boolean columns in civicrm_relationship:
- is_permission_a_b default 0
++ If true, contact a has permission to view / edit contact and related data for contact b
- is_permission_b_a default 0
++ If true, contact a has permission to view / edit contact and related data for contact b
1.2 Note the "DB upgrade task" on wiki : http://wiki.civicrm.org/confluence/display/CRM/Upgrade+Requirements+-+2.0+to+2.1
2. View / Edit Relationships
=====================
2.1 Modify create / edit relationship form, and view relationship page to include is_permission_<direction> fields as checkboxes.
[ x ] $display_name_a . ' can view and update information for ' . $display_name_b
[ x ] $display_name_b . ' can view and update information for ' . $display_name_a
3. Contact Dashboard - Display Permissioned Related Contacts
==================================================
3.1 Add new section w/ selector to the Contact Dashboard. Section title is "My Contacts / Organizations"
3.2 Allow admin to enable / disable this section via civicrm_preferences.user_dashboard_options. Default is TRUE.
3.2.1 civicrm_add_domain.tpl needs a new insert statement for a civicrm_option_value record in the 'user_dashboard_options' option group
3.2.2 upgrade (2.0 - 2.1) script needs to add this record (note this on the wiki 2.0->2.1 upgrade page)
3.3 Include section / selector in contact dashboard IF enabled via site preferences AND there are 1 or more relationships WHERE:
- relationship.is_active is true
- relationship is current (start_date <= today() <= end_date)
- reiationship.s_permission_<direction> is true
(For now, we'll only list "Current" permissioned relationships - not Inactive ones.)
Selector
-----------
I think we can use the existing Relationships selector - CRM_Contact_BAO_Relationship::getRelationship for this page. (same columns are good)
Selector Actions
----------------------
Edit - Load selected contact in a hard-coded "simple contact information" form. This is the same form we'll use when collecting Organization info for the "on behalf of" contributions and event registration. The form is a subset of Edit.php, containing the following fields:
- If related contact is an Organization - Organization Name
- If Individual - Prefix, First, Middle, Last, Suffix
- If Household - Household Name
- is_primary address fields - include all address editing fields as configured in preferences.address_options
- is_primary email (one only)
- is_primary phone (one only - type = Phone)
Disable - After jscript confirm, set's relationship.is_active to false
Dashboard - Link to Contact Dashboard for the selected contact (this allows user to view Groups, Memberships etc for the related permissioned contact)
4. Modify permissioning on Contact Dashboard
====================================
To allow user to view their permissioned related contacts' dashboards independent of the "view all contacts" or ACL permissions they might have.
Attachments
Issue Links
- supplements
-
CRM-2964 Online Contribution / Membership Signup on Behalf of an Organization
-
- Done/Fixed
-