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

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

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8
    • Fix Version/s: None
    • Component/s: 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

              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: