History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CRM-2963
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed/Completed
Priority: Major Major
Assignee: Donald A. Lobo
Reporter: David Greenberg
Votes: 0
Watchers: 0
Available Workflow Actions

Unclose Issue
Operations

If you were logged in you would be able to see more operations.
CiviCRM

Permissioning Relationships Between Contacts

Created: 09/Apr/08 01:05 AM   Updated: 20/Aug/08 01:52 AM
Component/s: Core CiviCRM
Affects Version/s: 2.1
Fix Version/s: 2.1

Time Tracking:
Not Specified

Issue Links:
Suplementation
 

Verified for 2.1: Yes
Verified for 2.0: No


 Description  « Hide
(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.


 All   Comments   Work Log   Change History   FishEye      Sort Order:
Bharat Shukla - 08/May/08 07:55 AM
Assigning for QA

Bharat Shukla - 08/May/08 10:32 AM
fix in rev-14374

David Greenberg - 06/Jun/08 02:08 AM
Save or Cancel from civicrm/contact/relatedcontact?action=update&reset=1&cid=105 form should go back to Contact Dashboard - currently it redirects to CiviCRM Home (civicrm?reset=1)

Deepak Srivastava - 06/Jun/08 07:54 AM
- fixed in rev: 14957.