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

Separate capability for bulk picture upload

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3, 2.4.3, 2.5
    • Fix Version/s: 2.6
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      BEFORE UPGRADE:

      1. Create a role called 'uploaduser'
      2. Set the contextlevels to SYSTEM
      3. Add a single permission 'moodle/site:uploadusers' to allow
      4. Create a new user called 'uploaduser'
      5. Assign the uploaduser role to the uploaduser user at system context

      RUN UPGRADE:

      1. VERIFY: no errors are seen
      2. As admin, go to admin > users > accounts > upload user pictures
      3. VERIFY: you can access the page and upload user pictures succesfully
      4. Create a new role called 'user picture uploader'
      5. Set the single capability uploaduser:uploaduserpictures to allow
      6. Create a new user called 'picuploader'
      7. Assign the new user the 'user picture uploader' role at system context
      8. Login as the picuploader user
      9. VERIFY: you can acces the user upload page (admin > users > accounts > upload user pictures) and upload user pictures succesfully
      10. VERIFY: you can't access the main uploadusers page.
      11. VERIFY: that the uploaduser role has two capabilities, moodle/site:uploadusers and tool/uploaduser:uploaduserpictures
      Show
      BEFORE UPGRADE: Create a role called 'uploaduser' Set the contextlevels to SYSTEM Add a single permission 'moodle/site:uploadusers' to allow Create a new user called 'uploaduser' Assign the uploaduser role to the uploaduser user at system context RUN UPGRADE: VERIFY: no errors are seen As admin, go to admin > users > accounts > upload user pictures VERIFY: you can access the page and upload user pictures succesfully Create a new role called 'user picture uploader' Set the single capability uploaduser:uploaduserpictures to allow Create a new user called 'picuploader' Assign the new user the 'user picture uploader' role at system context Login as the picuploader user VERIFY: you can acces the user upload page (admin > users > accounts > upload user pictures) and upload user pictures succesfully VERIFY: you can't access the main uploadusers page. VERIFY: that the uploaduser role has two capabilities, moodle/site:uploadusers and tool/uploaduser:uploaduserpictures
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-17468-master

      Description

      Currently the bulk upload of users (uploaduser.php) and pictures (uploadpicture.php) require the same capability: moodle/site:uploadusers.

      There are use cases where a user requires access to upload profile pictures but should not have access to upload users. This patch for 1.9 addresses this by creating a new capability moodle/site:uploaduserpictures which clones the permissions from moodle/site:uploadusers for backwards compatibility.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13