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

Admin externalpage class for using callbacks to determine access

    XMLWordPrintable

Details

    • MOODLE_39_STABLE
    • MOODLE_310_STABLE
    • Hide
      1. Ensure $CFG->dirroot/local is writeable by webserver (so we can install example plugin)
      2. Login as admin
      3. Navigate to Plugins > Install plugins in site administration
      4. Upload local_mdl69825.zip and press Install plugin from the ZIP file
      5. Finish installation
      6. Press on Site administation
      7. Confirm you see a new setting "MDL-69825 Test"
      8. Click on MDL-69825 Test
      9. Confirm you see the message You can access it
      10. Create a new user
      11. Navigate to Users > Permissions > Site administrators in site administration
      12. Make your new user a site administrator
      13. Log out
      14. Log in as new user
      15. Press on Site administration
      16. Confirm you don't see a new setting "MDL-69825 Test"
      17. Manually navigate to $CFG->wwwroot/local/mdl69825/index.php
      18. Confirm you get an access denied error
      Show
      Ensure $CFG->dirroot/local is writeable by webserver (so we can install example plugin) Login as admin Navigate to Plugins > Install plugins in site administration Upload local_mdl69825.zip and press Install plugin from the ZIP file Finish installation Press on Site administation Confirm you see a new setting " MDL-69825 Test" Click on MDL-69825 Test Confirm you see the message You can access it Create a new user Navigate to Users > Permissions > Site administrators in site administration Make your new user a site administrator Log out Log in as new user Press on Site administration Confirm you don't see a new setting " MDL-69825 Test" Manually navigate to $CFG->wwwroot/local/mdl69825/index.php Confirm you get an access denied error

    Description

      It would be helpful to have an externalpage class to use for plugin settings pages that accepts a callback method to provide appropriate access checks (we use this frequently in Workplace)

      Attachments

        1. MDL-69825.jpg
          28 kB
          Anna Carissa Sadia

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Marina Glancy Marina Glancy
              Adrian Greeve Adrian Greeve
              Anna Carissa Sadia Anna Carissa Sadia
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/20

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 50 minutes
                  4h 50m