Issue #3124302 by Sam152, seanB: The media library should perform access checks against the revision of the entity being edited (cherry picked from commit d901cf487be7462a4bd54abaf5d1b6f23a992160)