CRM-6127 Permission to edit related contact does not give permission to edit via profile

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.1.5
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      See CRM-5850 for a closely related issue.

      Profile/Form.php does not check to see if the current user is permitted to edit the profile by virtue of a relationship. The same change that was made in CRM-5850 needs to be made to Profile/Form.php

      Patch attached.

      Please check to see if I formatted the patch correctly; this is my first try and I don't have Subversion installed - I did it manually with diff.

        Attachments

          Activity

          [CRM-6127] Permission to edit related contact does not give permission to edit via profile
          Donald A. Lobo added a comment -

          What version did u check on? i checked the code in 3.1 svn and i think we handle it now

          Chris Owens added a comment -

          I checked in 3.1.3 and it wasn't handled as expected (and I didn't see any obvious code in Profile/Form.php that would have handled it.

          Donald A. Lobo added a comment -

          can u please check and test this in 3.1.4

          Chris Owens added a comment -

          not fixed in 3.1.4

          you need to add the line

          CRM_Contact_BAO_Contact_Permission::allow( $this->_id, CRM_Core_Permission::EDIT ) ||

          at line 361

          Donald A. Lobo added a comment -

          actually it does. Check the variable:

          $this->_isPermissionedChecksum

          which is set in the class: CRM_Profile_Form_Edit

          you should run 3.1.4 and see if it works or not

          Chris Owens added a comment -

          Will test as soon as I have a non-production 3.1.4, probably by Wednesday

            People

            • Assignee:
              Kiran Jagtap
              Reporter:
              Chris Owens

              Dates

              • Created:
                Updated:
                Resolved: