Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-54667

When user has 'moodle/user:editprofile' but not moodle/user:update All the profile edits link to his own profile

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      1. Login as admin.
      2. Go to Site administration ► Users ► Permissions ► Define roles
      3. Click Add a new role
      4. Import the attached file ParentRole.xml.
      5. Create 2 users s1 and p1.
      6. Navigate to s1's profile.
      7. Under the Administration section, click Preferences.
      8. On s1's Preferences page, click Assign roles relative to this user under Roles.
      9. Click on the Parent role and add p1 as s1's parent.
      10. Create a course C1.
      11. Enrol s1 as a student.
      12. Enrol p1 as well. No need to set any role.
      Edit profile in user context
      1. Log out and log in as p1.
      2. On p1's Dashboard, click Customise this page and add the Mentees block.
      3. On the Mentees block, click on s1's link.
      4. On s1's profile, click Edit profile.
        • Confirm that s1's details comes up on the edit form.
      5. Optionally, make some modifications.
      6. Click Update profile.
        • Confirm that you are redirected to s1's full profile page.
      Edit profile in course context
      1. Still logged on as p1, go back to the Dashboard.
      2. On the Mentees block, click on s1's link.
      3. On s1's profile, click C1's link under the Course details > Course profiles section.
      4. On s1's course profile, click Edit profile
        • Confirm that s1's details comes up on the edit form.
      5. Optionally, make some modifications.
      6. Click Update profile.
        • Confirm that you are redirected to s1's course profile page.
      Show
      Setup Login as admin. Go to Site administration ► Users ► Permissions ► Define roles Click Add a new role Import the attached file ParentRole.xml . Create 2 users s1 and p1. Navigate to s1's profile. Under the Administration section, click Preferences . On s1's Preferences page, click Assign roles relative to this user under Roles. Click on the Parent role and add p1 as s1's parent. Create a course C1. Enrol s1 as a student. Enrol p1 as well. No need to set any role. Edit profile in user context Log out and log in as p1. On p1's Dashboard, click Customise this page and add the Mentees block. On the Mentees block, click on s1's link. On s1's profile, click Edit profile . Confirm that s1's details comes up on the edit form. Optionally, make some modifications. Click Update profile . Confirm that you are redirected to s1's full profile page. Edit profile in course context Still logged on as p1, go back to the Dashboard. On the Mentees block, click on s1's link. On s1's profile, click C1's link under the Course details > Course profiles section. On s1's course profile, click Edit profile Confirm that s1's details comes up on the edit form. Optionally, make some modifications. Click Update profile . Confirm that you are redirected to s1's course profile page.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-54667-master

      Description

      When user doesn't have the ability for advanced edit of users (Parents for example https://docs.moodle.org/30/en/Parent_role) he can't edit the profiles of other users as the url gets created in the form of user/edit.php?userid=3 and edit.php expect the param as id not userid.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jkb Jakub Kania
              Reporter:
              jkb Jakub Kania
              Peer reviewer:
              Jun Pataleta
              Integrator:
              David Monllaó
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jul/16