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

Can access file methods aka refactor into a proper 'File Serving API'

    XMLWordPrintable

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.8
    • None
    • Files API

    Description

      This issue is to implement a new method to allow a check to be made if a user can access a file. The method is:

      • \file_storeage\can_access_file();` e.g. `$fs->can_access_file($file)`

      The use case here is there are situations where we want to be able to check if a file can be accessed by a user in a particular context without sending the file. Currently there is no way to do this,

      A specific use case is if a filter wants to check that a user can access a particular file embeded in some content and transmute that file prior to delivery OR deliver another file in it's place (possibly from outside of Moodle).

      Attachments

        Issue Links

          Activity

            People

              mattp@catalyst-au.net Matt Porritt
              mattp@catalyst-au.net Matt Porritt
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: